-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Describe the bug
A clear and concise description of what the bug is.
Similar to #3093, in JBoss JacksonAnnotationIntrospector._annotationsInside
, referenced statically via ObjectMapper.DEFAULT_ANNOTATION_INTROSPECTOR
, might contain references to annotations from Deployment Class-Loaders, which leads to leaking those when the deployment is stopped/undeployed.
Version information
Which Jackson version(s) was this for?
2.13.4.2, but from the code it looks like it's still true today.
protected final static AnnotationIntrospector DEFAULT_ANNOTATION_INTROSPECTOR = new JacksonAnnotationIntrospector(); |
Line 82 in de62c67
protected transient LRUMap<Class<?>,Boolean> _annotationsInside = new LRUMap<Class<?>,Boolean>(48, 48); |
Line 162 in de62c67
_annotationsInside.putIfAbsent(type, b); |
To Reproduce
https://github.com/ciis0/jackson-3771
Expected behavior
If reproduction itself needs further explanation, you may also add more details here.
Additional context
Add any other context about the problem here.
Reference to annotation class from deployment class-loader in JacksonAnnotationIntrospector
instance:
Static reference to that annotation introspector instance from ObjectMapper
: