Skip to content

Commit

Permalink
Try to fix #462 for 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed May 20, 2014
1 parent f339b5c commit 2a0d136
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,12 @@ protected CreatorProperty constructCreatorProperty(DeserializationContext ctxt,
property = property.withType(type);
}
// Is there an annotation that specifies exact deserializer?
JsonDeserializer<Object> deser = findDeserializerFromAnnotation(ctxt, param);
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);

Expand All @@ -696,7 +701,8 @@ protected CreatorProperty constructCreatorProperty(DeserializationContext ctxt,
if (typeDeser == null) {
typeDeser = findTypeDeserializer(config, type);
}

// Note: contextualization of typeDeser _should_ occur in constructor of CreatorProperty
// so it is not called directly here
CreatorProperty prop = new CreatorProperty(name, type, property.getWrapperName(),
typeDeser, beanDesc.getClassAnnotations(), param, index, injectableValueId,
metadata);
Expand Down

0 comments on commit 2a0d136

Please sign in to comment.