|
15 | 15 | import com.fasterxml.jackson.databind.jsontype.TypeDeserializer; |
16 | 16 | import com.fasterxml.jackson.databind.type.LogicalType; |
17 | 17 | import com.fasterxml.jackson.databind.type.TypeFactory; |
18 | | - |
| 18 | +import com.fasterxml.jackson.databind.util.ClassUtil; |
19 | 19 | import com.fasterxml.jackson.datatype.guava.deser.util.RangeFactory; |
20 | 20 | import com.fasterxml.jackson.datatype.guava.deser.util.RangeHelper; |
21 | 21 |
|
@@ -131,7 +131,7 @@ public Range<?> deserialize(JsonParser p, DeserializationContext context) |
131 | 131 | throws IOException |
132 | 132 | { |
133 | 133 | // NOTE: either START_OBJECT _or_ FIELD_NAME fine; latter for polymorphic cases |
134 | | - JsonToken t = p.getCurrentToken(); |
| 134 | + JsonToken t = p.currentToken(); |
135 | 135 | if (t == JsonToken.START_OBJECT) { |
136 | 136 | t = p.nextToken(); |
137 | 137 | } |
@@ -195,7 +195,7 @@ public Range<?> deserialize(JsonParser p, DeserializationContext context) |
195 | 195 |
|
196 | 196 | private BoundType deserializeBoundType(DeserializationContext context, JsonParser p) throws IOException |
197 | 197 | { |
198 | | - expect(context, JsonToken.VALUE_STRING, p.getCurrentToken()); |
| 198 | + expect(context, JsonToken.VALUE_STRING, p.currentToken()); |
199 | 199 | String name = p.getText(); |
200 | 200 | if (name == null) { |
201 | 201 | name = ""; |
@@ -227,8 +227,9 @@ private Comparable<?> deserializeEndpoint(DeserializationContext context, JsonPa |
227 | 227 | // assume definition, but may need to reconsider |
228 | 228 | context.reportBadDefinition(_rangeType, |
229 | 229 | String.format( |
230 | | - "Field [%s] deserialized to [%s], which does not implement Comparable.", |
231 | | - p.currentName(), obj.getClass().getName())); |
| 230 | + "Field '%s' deserialized to a %s, which does not implement Comparable.", |
| 231 | + p.currentName(), |
| 232 | + ClassUtil.classNameOf(obj))); |
232 | 233 | } |
233 | 234 | return (Comparable<?>) obj; |
234 | 235 | } |
|
0 commit comments