Skip to content

Commit

Permalink
Merge branch '2.19'
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jan 16, 2025
2 parents dc04bdd + dcab137 commit 916cc53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,8 @@ public Object deserialize(JsonParser p, DeserializationContext ctxt, Object bean
return _deserializeFromNonArray(p, ctxt);
}

/* No good way to verify that we have an array... although could I guess
* check via JsonParser. So let's assume everything is working fine, for now.
*/
// No good way to verify that we have an array... although could I guess
// check via JsonParser. So let's assume everything is working fine, for now.
if (_injectables != null) {
injectValues(ctxt, bean);
}
Expand Down Expand Up @@ -354,7 +353,7 @@ protected Object _deserializeNonVanilla(JsonParser p, DeserializationContext ctx
p.skipChildren();
}
// Ok; extra fields? Let's fail, unless ignoring extra props is fine
if (!_ignoreAllUnknown) {
if (!_ignoreAllUnknown && ctxt.isEnabled(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)) {
ctxt.reportWrongTokenException(this, JsonToken.END_ARRAY,
"Unexpected JSON values; expected at most %d properties (in JSON Array)",
propCount);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,8 @@ public void testUnknownExtraProp() throws Exception
.without(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
.readValue(json);
assertNotNull(v);
// note: +1 for both so
assertEquals(v.value.x, 42);
assertEquals(v.value.y, 13);
assertEquals(42, v.value.x);
assertEquals(13, v.value.y);
assertTrue(v.value.complete);
assertEquals("Foobar", v.value.name);
}
Expand Down

0 comments on commit 916cc53

Please sign in to comment.