Bob Paulin created NIFI-15388:
---------------------------------

             Summary: Leak in ReflectionUtils annotation cache.  Value should 
use WeakReference
                 Key: NIFI-15388
                 URL: https://issues.apache.org/jira/browse/NIFI-15388
             Project: Apache NiFi
          Issue Type: Bug
            Reporter: Bob Paulin


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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to