[
https://issues.apache.org/jira/browse/NIFI-15388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael W Moser reassigned NIFI-15388:
--------------------------------------
Assignee: Bob Paulin
> Leak in ReflectionUtils annotation cache.
> ------------------------------------------
>
> Key: NIFI-15388
> URL: https://issues.apache.org/jira/browse/NIFI-15388
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Bob Paulin
> Assignee: Bob Paulin
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
> When org.apache.nifi.util.ReflectionUtils invoke methods are called
> annotations are cached in a WeakHashMap. While keys (Class) in the
> WeakHashMap are weak references the values (Methods) are strong references.
> The classes can not then be garbaged collected because the Methods have a
> reference to there class.
>
> -So the values that are added to the cache should also be wrapped in a
> WeakReference. Then the classes can be garbage collected.-
>
> Keys should be removed from the cache when the ClassLoader is removed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)