-
-
Notifications
You must be signed in to change notification settings - Fork 816
Closed
Description
(note: found as part of work on FasterXML/jackson-databind#4902 to enable "fail on extra tokens" DeserializationFeature
).
So: odd failures seen for tests:
[ERROR] TestSubtypesExternalPropertyMissingProperty.testDeserializationNull:141->checkOrangeBoxNull:232 »
JsonParse Unexpected close marker '}': expected ']' (for root starting
at [Source: (String)"{"type":"orange","fruit":null}}"; line: 1, column: 0])
which is due to ReaderBasedJsonParser
(and others), on:
private void _closeScope(int i) throws IOException {
if (i == INT_RBRACKET) {
_updateLocation();
if (!_parsingContext.inArray()) {
_reportMismatchedEndMarker(i, '}');
}
_parsingContext = _parsingContext.clearAndGetParent();
_updateToken(JsonToken.END_ARRAY);
}
...
}
in which check is assuming there always IS a start marker -- but fails to consider case where there is no open scope. It should.
This needs to be checked against all 4 backends
Metadata
Metadata
Assignees
Labels
No labels