From e4bfe09882e6e81ef68ee2f13ca257d1bbc0f9d9 Mon Sep 17 00:00:00 2001 From: Luck Date: Sat, 25 Mar 2017 11:38:02 +0000 Subject: [PATCH] Don't bother loading test classes (#217) --- .../luckperms/common/dependencies/DependencyManager.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/me/lucko/luckperms/common/dependencies/DependencyManager.java b/common/src/main/java/me/lucko/luckperms/common/dependencies/DependencyManager.java index f0bce88c..e6fa6add 100644 --- a/common/src/main/java/me/lucko/luckperms/common/dependencies/DependencyManager.java +++ b/common/src/main/java/me/lucko/luckperms/common/dependencies/DependencyManager.java @@ -101,7 +101,7 @@ public class DependencyManager { // Load classes. for (Map.Entry e : toLoad) { try { - loadJar(plugin, e.getValue(), e.getKey().getTestClass()); + loadJar(plugin, e.getValue()); } catch (Throwable e1) { plugin.getLog().severe("Failed to load jar for dependency " + e.getKey().name()); e1.printStackTrace(); @@ -132,7 +132,7 @@ public class DependencyManager { } } - private static void loadJar(LuckPermsPlugin plugin, File file, String baseClass) throws Exception { + private static void loadJar(LuckPermsPlugin plugin, File file) throws Exception { URLClassLoader classLoader = (URLClassLoader) plugin.getClass().getClassLoader(); if (plugin.getServerType() != PlatformType.SPONGE && !plugin.getServerName().equals("KCauldron")) { @@ -140,7 +140,6 @@ public class DependencyManager { } ADD_URL_METHOD.invoke(classLoader, file.toURI().toURL()); - classLoader.loadClass(baseClass).newInstance(); // Load a test class } }