-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
I am using using jackson version 2.4.4.
I was answering on one of the questions on the stackoverflow and found that 'defaultImpl' configuration is ignored if to use 'WRAPPER_OBJECT' include type. Code example:
@JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include= JsonTypeInfo.As.WRAPPER_OBJECT, defaultImpl = UnknownProduct.class)
After some debugging I found that this specific include type (WRAPPER_OBJECT) ignoring the defaultImpl configuration. Here is a constructor of the AsWrapperTypeDeserializer which takes defaultImpl class as a parameter but then ignore it:
public AsWrapperTypeDeserializer(JavaType bt, TypeIdResolver idRes,
String typePropertyName, boolean typeIdVisible, Class<?> defaultImpl)
{
super(bt, idRes, typePropertyName, typeIdVisible, null);
}
Other include types are working fine (deserializers are passing defaultImpl configuration into the super clas constructor)
Metadata
Metadata
Assignees
Labels
No labels