eliminate a possibility for the loader to lock up
All checks were successful
/ Build BaseBand Loader (push) Successful in 1m17s
All checks were successful
/ Build BaseBand Loader (push) Successful in 1m17s
This commit is contained in:
parent
3f18de7575
commit
d7422420e0
1 changed files with 12 additions and 10 deletions
|
@ -119,10 +119,11 @@ public class CustomClassLoader extends ClassLoader implements Util {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected Class<?> findClass(String name) throws ClassNotFoundException {
|
||||
protected synchronized Class<?> findClass(String name) throws ClassNotFoundException {
|
||||
synchronized (Launch.classLoader) {
|
||||
if (names.contains(name.replace('.', '/') + ".class")) {
|
||||
Class<?> clazz = loadBBClass(name);
|
||||
if(clazz != null)
|
||||
if (clazz != null)
|
||||
return clazz;
|
||||
}
|
||||
try {
|
||||
|
@ -131,6 +132,7 @@ public class CustomClassLoader extends ClassLoader implements Util {
|
|||
return super.findClass(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Class<?> loadBBClass(String name) {
|
||||
/*Set<ClassLoader> uniqueClassLoaders = Thread.getAllStackTraces().keySet().stream()
|
||||
|
|
Loading…
Add table
Reference in a new issue