eliminate a possibility for the loader to lock up

This commit is contained in:
Daniella / Tove 2024-06-18 18:48:20 +02:00
parent 863568cd48
commit 2985d65193
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -134,6 +134,13 @@ public class CustomClassLoader extends ClassLoader implements Util {
}
}
@Override
public synchronized Class<?> loadClass(String name) throws ClassNotFoundException {
synchronized (Launch.classLoader) {
return super.loadClass(name);
}
}
private Class<?> loadBBClass(String name) {
/*Set<ClassLoader> uniqueClassLoaders = Thread.getAllStackTraces().keySet().stream()
.map(Thread::getContextClassLoader)