We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f3c165 commit e0f87c6Copy full SHA for e0f87c6
src/test/java/com/fasterxml/jackson/databind/node/TestObjectNode.java
@@ -290,4 +290,23 @@ public void testFailOnDupKeys() throws Exception
290
verifyException(e, "duplicate field 'a'");
291
}
292
293
+
294
+ public void testEqualityWrtOrder() throws Exception
295
+ {
296
+ ObjectNode ob1 = MAPPER.createObjectNode();
297
+ ObjectNode ob2 = MAPPER.createObjectNode();
298
299
+ // same contents, different insertion order; should not matter
300
301
+ ob1.put("a", 1);
302
+ ob1.put("b", 2);
303
+ ob1.put("c", 3);
304
305
+ ob2.put("b", 2);
306
+ ob2.put("c", 3);
307
+ ob2.put("a", 1);
308
309
+ assertTrue(ob1.equals(ob2));
310
+ assertTrue(ob2.equals(ob1));
311
+ }
312
0 commit comments