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