Browse Source

CachedIntrospectionResults uses SoftReference instead of WeakReference for non-cache-safe entries

Issue: SPR-11867
pull/579/head
Juergen Hoeller 12 years ago
parent
commit
f27b9498be
  1. 4
      spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java

4
spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java

@ -21,7 +21,7 @@ import java.beans.IntrospectionException; @@ -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;
@ -196,7 +196,7 @@ public class CachedIntrospectionResults { @@ -196,7 +196,7 @@ public class CachedIntrospectionResults {
}
results = new CachedIntrospectionResults(beanClass);
synchronized (classCache) {
classCache.put(beanClass, new WeakReference<CachedIntrospectionResults>(results));
classCache.put(beanClass, new SoftReference<CachedIntrospectionResults>(results));
}
}
}

Loading…
Cancel
Save