Skip to content

Commit 60def8d

Browse files
committed
[bugfix] Correct the null checks in equality of MatchTerm
1 parent 68c7649 commit 60def8d

File tree

1 file changed

+2
-3
lines changed
  • exist-core/src/main/java/org/exist/dom/persistent

1 file changed

+2
-3
lines changed

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
@@ -421,9 +421,8 @@ public boolean equals(final Object other) {
421421

422422
if (other instanceof Match) {
423423
final Match om = (Match) other;
424-
return om.matchTerm != null
425-
&& om.matchTerm.equals(matchTerm)
426-
&& om.nodeId.equals(nodeId);
424+
return om.nodeId.equals(nodeId)
425+
&& ((om.matchTerm != null && om.matchTerm.equals(matchTerm)) || matchTerm == null);
427426
} else {
428427
return false;
429428
}

0 commit comments

Comments
 (0)