diff --git a/src/test/java/com/fasterxml/jackson/databind/objectid/JSOGDeserialize622Test.java b/src/test/java/com/fasterxml/jackson/databind/objectid/JSOGDeserialize622Test.java index c0f2c30f00..0dc000a6c8 100644 --- a/src/test/java/com/fasterxml/jackson/databind/objectid/JSOGDeserialize622Test.java +++ b/src/test/java/com/fasterxml/jackson/databind/objectid/JSOGDeserialize622Test.java @@ -95,14 +95,14 @@ public JSOGRef generateId(Object forPojo) { static class JSOGRefDeserializer extends JsonDeserializer { @Override - public JSOGRef deserialize(JsonParser p, DeserializationContext ctx) throws IOException { - JsonNode node = p.readValueAsTree(); + public JSOGRef deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + JsonNode node = ctxt.readTree(p); if (node.isTextual()) { return new JSOGRef(node.asInt()); } JsonNode n = node.get(REF_KEY); if (n == null) { - ctx.reportInputMismatch(JSOGRef.class, "Could not find key '"+REF_KEY + ctxt.reportInputMismatch(JSOGRef.class, "Could not find key '"+REF_KEY +"' from ("+node.getClass().getName()+"): "+node); } return new JSOGRef(n.asInt());