CachedIntrospectionResults uses SoftReference instead of WeakReference for non-cache-safe entries
Issue: SPR-11867
(cherry picked from commit f27b949)
This commit is contained in:
@@ -21,7 +21,7 @@ import java.beans.IntrospectionException;
|
||||
import java.beans.Introspector;
|
||||
import java.beans.PropertyDescriptor;
|
||||
import java.lang.ref.Reference;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.lang.ref.SoftReference;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
@@ -194,7 +194,7 @@ public class CachedIntrospectionResults {
|
||||
}
|
||||
results = new CachedIntrospectionResults(beanClass);
|
||||
synchronized (classCache) {
|
||||
classCache.put(beanClass, new WeakReference<CachedIntrospectionResults>(results));
|
||||
classCache.put(beanClass, new SoftReference<CachedIntrospectionResults>(results));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user