[
https://issues.apache.org/jira/browse/NIFI-15388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Handermann resolved NIFI-15388.
-------------------------------------
Fix Version/s: 2.8.0
Resolution: Fixed
> Class Reference 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
> Fix For: 2.8.0
>
> Time Spent: 1h
> 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)