mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 03:31:15 +03:00
[FIX] Странная ошибка с MH.
This commit is contained in:
parent
05093d8865
commit
aa4d4881c8
1 changed files with 2 additions and 1 deletions
|
@ -26,6 +26,7 @@
|
||||||
import java.security.cert.X509Certificate;
|
import java.security.cert.X509Certificate;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
import java.util.jar.JarFile;
|
import java.util.jar.JarFile;
|
||||||
|
@ -156,7 +157,7 @@ public LauncherModule loadModule(Path file) throws IOException {
|
||||||
throw new ClassNotFoundException("Invalid module class... Not contains LauncherModule in hierarchy.");
|
throw new ClassNotFoundException("Invalid module class... Not contains LauncherModule in hierarchy.");
|
||||||
LauncherModule module;
|
LauncherModule module;
|
||||||
try {
|
try {
|
||||||
module = (LauncherModule) MethodHandles.publicLookup().findConstructor(clazz, VOID_TYPE).invoke();
|
module = (LauncherModule) MethodHandles.publicLookup().findConstructor(clazz, VOID_TYPE).invokeWithArguments(Collections.emptyList());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
throw (InstantiationException) new InstantiationException("Error on instancing...").initCause(e);
|
throw (InstantiationException) new InstantiationException("Error on instancing...").initCause(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue