From aa4d4881c8af2bb80af4016aeffc488a16701c43 Mon Sep 17 00:00:00 2001 From: Zaxar163 Date: Mon, 25 Nov 2019 16:54:27 +0100 Subject: [PATCH] =?UTF-8?q?[FIX]=20=D0=A1=D1=82=D1=80=D0=B0=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20=D1=81=20?= =?UTF-8?q?MH.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pro/gravit/launcher/modules/impl/SimpleModuleManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/impl/SimpleModuleManager.java b/LauncherAPI/src/main/java/pro/gravit/launcher/modules/impl/SimpleModuleManager.java index 16737cd1..72d701fc 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/impl/SimpleModuleManager.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/modules/impl/SimpleModuleManager.java @@ -26,6 +26,7 @@ import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.function.Predicate; 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."); LauncherModule module; try { - module = (LauncherModule) MethodHandles.publicLookup().findConstructor(clazz, VOID_TYPE).invoke(); + module = (LauncherModule) MethodHandles.publicLookup().findConstructor(clazz, VOID_TYPE).invokeWithArguments(Collections.emptyList()); } catch (Throwable e) { throw (InstantiationException) new InstantiationException("Error on instancing...").initCause(e); }