Skip to content

Commit 71f97ce

Browse files
committed
Backport #1099 in 2.6(.6)
1 parent ccdb9fc commit 71f97ce

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/com/fasterxml/jackson/databind/node/ArrayNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public boolean equals(Comparator<JsonNode> comparator, JsonNode o)
115115
List<JsonNode> l1 = _children;
116116
List<JsonNode> l2 = other._children;
117117
for (int i = 0; i < len; ++i) {
118-
if (comparator.compare(l1.get(i), l2.get(i)) != 0) {
118+
if (!l1.get(i).equals(comparator, l2.get(i))) {
119119
return false;
120120
}
121121
}

src/main/java/com/fasterxml/jackson/databind/node/ObjectNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public boolean equals(Comparator<JsonNode> comparator, JsonNode o)
175175

176176
for (Map.Entry<String, JsonNode> entry : m1.entrySet()) {
177177
JsonNode v2 = m2.get(entry.getKey());
178-
if ((v2 == null) || comparator.compare(entry.getValue(), v2) != 0) {
178+
if ((v2 == null) || !entry.getValue().equals(comparator, v2)) {
179179
return false;
180180
}
181181
}

0 commit comments

Comments
 (0)