mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
[FEATURE] ModuleLaunch bug fix
This commit is contained in:
parent
b638efc0d1
commit
6cd5a69149
1 changed files with 15 additions and 2 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import pro.gravit.utils.helper.IOHelper;
|
import pro.gravit.utils.helper.IOHelper;
|
||||||
import pro.gravit.utils.helper.JVMHelper;
|
import pro.gravit.utils.helper.JVMHelper;
|
||||||
|
import pro.gravit.utils.helper.LogHelper;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
@ -133,8 +134,16 @@ protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundE
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Class<?> findClass(String moduleName, String name) {
|
protected Class<?> findClass(String name) throws ClassNotFoundException {
|
||||||
|
var clazz = findClass(null, name);
|
||||||
|
if(clazz == null) {
|
||||||
|
throw new ClassNotFoundException(name);
|
||||||
|
}
|
||||||
|
return clazz;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<?> findClass(String moduleName, String name) {
|
||||||
Class<?> clazz;
|
Class<?> clazz;
|
||||||
{
|
{
|
||||||
clazz = classMap.get(name);
|
clazz = classMap.get(name);
|
||||||
|
@ -164,7 +173,11 @@ protected Class<?> findClass(String moduleName, String name) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(clazz == null) {
|
if(clazz == null) {
|
||||||
clazz = super.findClass(moduleName, name);
|
try {
|
||||||
|
clazz = super.findClass(name);
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(clazz != null) {
|
if(clazz != null) {
|
||||||
classMap.put(name, clazz);
|
classMap.put(name, clazz);
|
||||||
|
|
Loading…
Reference in a new issue