Clean up usages of ClassLoaderReflectionToolkit (#5895)

This commit is contained in:
Basil Crow authored and GitHub committed 2021-11-12 08:01:28 +00:00
1 parent 63c183d05e
commit 1290af7ce1
3 files changed
+46 -12

No files matched your search

+1 -9
View File
@@ -2197,15 +2197,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
if (FAST_LOOKUP) {
for (PluginWrapper p : activePlugins) {
try {
Class<?> c = ClassLoaderReflectionToolkit._findLoadedClass(p.classLoader, name);
if (c != null) {
synchronized (loaded) {
loaded.put(name, c);
}
return c;
}
// calling findClass twice appears to cause LinkageError: duplicate class def
c = ClassLoaderReflectionToolkit._findClass(p.classLoader, name);
Class<?> c = ClassLoaderReflectionToolkit.loadClass(p.classLoader, name);
synchronized (loaded) {
loaded.put(name, c);
}