mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-03 00:37:55 +00:00
Improved code
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
package org.parabot.core.asm;
|
||||
|
||||
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.objectweb.asm.tree.ClassNode;
|
||||
import org.parabot.core.classpath.ClassPath;
|
||||
|
||||
import java.net.URL;
|
||||
import java.security.AllPermission;
|
||||
import java.security.CodeSource;
|
||||
@@ -10,10 +14,6 @@ import java.security.cert.Certificate;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.objectweb.asm.tree.ClassNode;
|
||||
import org.parabot.core.classpath.ClassPath;
|
||||
|
||||
/**
|
||||
*
|
||||
* Makes classnodes into runnable classes
|
||||
@@ -52,8 +52,8 @@ public class ASMClassLoader extends ClassLoader {
|
||||
@Override
|
||||
protected Class<?> findClass(String name) throws ClassNotFoundException {
|
||||
try {
|
||||
return super.getSystemClassLoader().loadClass(name);
|
||||
} catch (Exception e) {
|
||||
return getSystemClassLoader().loadClass(name);
|
||||
} catch (Exception ignored) {
|
||||
|
||||
}
|
||||
String key = name.replace('.', '/');
|
||||
@@ -67,7 +67,7 @@ public class ASMClassLoader extends ClassLoader {
|
||||
classCache.put(key, c);
|
||||
return c;
|
||||
}
|
||||
return super.getSystemClassLoader().loadClass(name);
|
||||
return getSystemClassLoader().loadClass(name);
|
||||
}
|
||||
|
||||
private final Class<?> nodeToClass(ClassNode node) {
|
||||
|
||||
Reference in New Issue
Block a user