Skip to content

Commit e99a748

Browse files
committed
[bugfix] Correct the null checks in equality of MatchTerm
1 parent 4520f3f commit e99a748

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • exist-core/src/main/java/org/exist/dom/persistent

exist-core/src/main/java/org/exist/dom/persistent/Match.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,8 @@ public boolean equals(final Object other) {
397397

398398
if (other instanceof Match) {
399399
final Match om = (Match) other;
400-
return om.matchTerm != null
401-
&& om.matchTerm.equals(matchTerm)
402-
&& om.nodeId.equals(nodeId);
400+
return om.nodeId.equals(nodeId)
401+
&& ((om.matchTerm != null && om.matchTerm.equals(matchTerm)) || matchTerm == null);
403402
} else {
404403
return false;
405404
}

0 commit comments

Comments
 (0)