Skip to content

Commit 5ed8707

Browse files
committed
Fix #1771
1 parent 04c777f commit 5ed8707

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

release-notes/VERSION

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Project: jackson-databind
1010
#1768: Improve `TypeFactory.constructFromCanonical()` to work with
1111
`java.lang.reflect.Type.getTypeName()' format
1212
(suggested by Luís C)
13+
#1771: Pass missing argument for string formatting in `ObjectMapper`
14+
(reported by Nils B)
1315

1416
2.9.1 (07-Sep-2017)
1517

src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4064,18 +4064,17 @@ protected Object _unwrapAndDeserialize(JsonParser p, DeserializationContext ctxt
40644064
ctxt.reportWrongTokenException(rootType, JsonToken.START_OBJECT,
40654065
"Current token not START_OBJECT (needed to unwrap root name '%s'), but %s",
40664066
expSimpleName, p.getCurrentToken());
4067-
40684067
}
40694068
if (p.nextToken() != JsonToken.FIELD_NAME) {
40704069
ctxt.reportWrongTokenException(rootType, JsonToken.FIELD_NAME,
4071-
"Current token not FIELD_NAME (to contain expected root name '"
4072-
+expSimpleName+"'), but "+p.getCurrentToken());
4070+
"Current token not FIELD_NAME (to contain expected root name '%s'), but %s",
4071+
expSimpleName, p.getCurrentToken());
40734072
}
40744073
String actualName = p.getCurrentName();
40754074
if (!expSimpleName.equals(actualName)) {
40764075
ctxt.reportInputMismatch(rootType,
40774076
"Root name '%s' does not match expected ('%s') for type %s",
4078-
actualName, expSimpleName);
4077+
actualName, expSimpleName, rootType);
40794078
}
40804079
// ok, then move to value itself....
40814080
p.nextToken();

0 commit comments

Comments
 (0)