Drop Introspector.flushFromCaches calls completely
According to the JDK's documentation and changelog, the Introspector itself safely handles weak references as of JDK 6 update 21 (which is what we require for Spring 4.0). Issue: SPR-11356
This commit is contained in:
parent
167329ce0c
commit
defc1d3157
|
@ -289,20 +289,6 @@ public class CachedIntrospectionResults {
|
|||
}
|
||||
this.beanInfo = beanInfo;
|
||||
|
||||
// Only bother with flushFromCaches if the Introspector actually cached...
|
||||
if (!shouldIntrospectorIgnoreBeaninfoClasses) {
|
||||
// Immediately remove class from Introspector cache, to allow for proper
|
||||
// garbage collection on class loader shutdown - we cache it here anyway,
|
||||
// in a GC-friendly manner. In contrast to CachedIntrospectionResults,
|
||||
// Introspector does not use WeakReferences as values of its WeakHashMap!
|
||||
Class<?> classToFlush = beanClass;
|
||||
do {
|
||||
Introspector.flushFromCaches(classToFlush);
|
||||
classToFlush = classToFlush.getSuperclass();
|
||||
}
|
||||
while (classToFlush != null);
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Caching PropertyDescriptors for class [" + beanClass.getName() + "]");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue