You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When ObjectMapper is copied via ObjectMapper.copy(), the copy of SubtypeResolver is not properly propagated to all places, such as SerializationConfig/DeserializationConfig.
Version information
2.11.1, most likely introduced with #2755
2.11.0 seems working fine.
To Reproduce
import com.fasterxml.jackson.databind.ObjectMapper;
public class JacksonSubtypeResolverIssue {
public static void main(String[] args) {
var objectMapper = new ObjectMapper();
System.out.println(objectMapper.getSubtypeResolver() == objectMapper.getSerializationConfig().getSubtypeResolver());
var copyObjectMapper = objectMapper.copy();
System.out.println(copyObjectMapper.getSubtypeResolver() == copyObjectMapper.getSerializationConfig().getSubtypeResolver());
}
}
Output:
true
false
The text was updated successfully, but these errors were encountered:
When
ObjectMapper
is copied viaObjectMapper.copy()
, the copy ofSubtypeResolver
is not properly propagated to all places, such asSerializationConfig
/DeserializationConfig
.Version information
2.11.1, most likely introduced with #2755
2.11.0 seems working fine.
To Reproduce
Output:
The text was updated successfully, but these errors were encountered: