skip loading module-info.class

This commit is contained in:
muhammadeko 2022-04-29 16:12:25 +07:00 committed by Melledy
parent d1e5fad95b
commit 789e5f57b8

View File

@ -66,7 +66,7 @@ public final class PluginManager {
Enumeration<JarEntry> entries = jarFile.entries();
while(entries.hasMoreElements()) {
JarEntry entry = entries.nextElement();
if(entry.isDirectory() || !entry.getName().endsWith(".class")) continue;
if(entry.isDirectory() || !entry.getName().endsWith(".class") || entry.getName().contains("module-info")) continue;
String className = entry.getName().replace(".class", "").replace("/", ".");
Class<?> clazz = loader.loadClass(className);
}