Fix node comparison for identical nodes except the value

This commit is contained in:
Luck 2018-06-07 19:58:55 +01:00
parent c0cd197bd0
commit 194790110d
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -84,6 +84,12 @@ public class NodeComparator implements Comparator<Node> {
return result;
}
// note vvv - we want false to have priority
result = -Boolean.compare(o1.getValue(), o2.getValue());
if (result != 0) {
return result;
}
throw new AssertionError("nodes are equal? " + o1 + " - " + o2);
}
}