Skip to content

Commit

Permalink
Fix #1771
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Sep 21, 2017
1 parent 04c777f commit 5ed8707
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions release-notes/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Project: jackson-databind
#1768: Improve `TypeFactory.constructFromCanonical()` to work with
`java.lang.reflect.Type.getTypeName()' format
(suggested by Luís C)
#1771: Pass missing argument for string formatting in `ObjectMapper`
(reported by Nils B)

2.9.1 (07-Sep-2017)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4064,18 +4064,17 @@ protected Object _unwrapAndDeserialize(JsonParser p, DeserializationContext ctxt
ctxt.reportWrongTokenException(rootType, JsonToken.START_OBJECT,
"Current token not START_OBJECT (needed to unwrap root name '%s'), but %s",
expSimpleName, p.getCurrentToken());

}
if (p.nextToken() != JsonToken.FIELD_NAME) {
ctxt.reportWrongTokenException(rootType, JsonToken.FIELD_NAME,
"Current token not FIELD_NAME (to contain expected root name '"
+expSimpleName+"'), but "+p.getCurrentToken());
"Current token not FIELD_NAME (to contain expected root name '%s'), but %s",
expSimpleName, p.getCurrentToken());
}
String actualName = p.getCurrentName();
if (!expSimpleName.equals(actualName)) {
ctxt.reportInputMismatch(rootType,
"Root name '%s' does not match expected ('%s') for type %s",
actualName, expSimpleName);
actualName, expSimpleName, rootType);
}
// ok, then move to value itself....
p.nextToken();
Expand Down

0 comments on commit 5ed8707

Please sign in to comment.