Revert "Make sure that same classloaders get same weak ref"
This reverts commit 50793e5244
.
This commit is contained in:
parent
50793e5244
commit
82dd2aa1b3
|
@ -82,14 +82,11 @@ public class DDCachingPoolStrategy implements PoolStrategy {
|
||||||
return createCachingTypePool(bootstrapCacheProvider, classFileLocator);
|
return createCachingTypePool(bootstrapCacheProvider, classFileLocator);
|
||||||
}
|
}
|
||||||
|
|
||||||
WeakReference<ClassLoader> loaderRef;
|
WeakReference<ClassLoader> loaderRef = loaderRefCache.getIfPresent(classLoader);
|
||||||
synchronized (loaderRefCache) {
|
|
||||||
loaderRef = loaderRefCache.getIfPresent(classLoader);
|
|
||||||
|
|
||||||
if (loaderRef == null) {
|
if (loaderRef == null) {
|
||||||
loaderRef = new WeakReference<>(classLoader);
|
loaderRef = new WeakReference<>(classLoader);
|
||||||
loaderRefCache.put(classLoader, loaderRef);
|
loaderRefCache.put(classLoader, loaderRef);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final int loaderHash = classLoader.hashCode();
|
final int loaderHash = classLoader.hashCode();
|
||||||
|
|
Loading…
Reference in New Issue