Contextualize deser with CreatorProperty, not intermediate prop
diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java b/src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
index 1acdac7..b4e305d 100644
--- a/src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
+++ b/src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
@@ -686,11 +686,7 @@
}
// Is there an annotation that specifies exact deserializer?
JsonDeserializer<?> deser = findDeserializerFromAnnotation(ctxt, param);
- // As per [Issue#462] need to ensure we contextualize deserializer too
- if (deser != null) {
- deser = ctxt.handlePrimaryContextualization(deser, property);
- }
-
+
// If yes, we are mostly done:
type = modifyTypeByAnnotation(ctxt, param, type);
@@ -706,6 +702,8 @@
typeDeser, beanDesc.getClassAnnotations(), param, index, injectableValueId,
metadata);
if (deser != null) {
+ // As per [Issue#462] need to ensure we contextualize deserializer before passing it on
+ deser = ctxt.handlePrimaryContextualization(deser, prop);
prop = prop.withValueDeserializer(deser);
}
return prop;