Add in "transform excluded" classes that we still need to take loading responsibility for

This commit is contained in:
Christian 2012-07-29 23:30:37 -04:00
parent b53ce2aa90
commit e1fc02b5b9
1 changed files with 22 additions and 7 deletions

View File

@ -16,7 +16,11 @@ public class RelaunchClassLoader extends URLClassLoader
{ {
private static String[] excludedPackages = { private static String[] excludedPackages = {
"java.", "sun.", "javax.", "java.", "sun.", "javax.",
"cpw.mods.fml.relauncher", "net.minecraftforge.classloading", "cpw.mods.fml.relauncher.", "net.minecraftforge.classloading."
};
private static String[] transformerExclusions =
{
"org.objectweb.asm.", "com.google.common." "org.objectweb.asm.", "com.google.common."
}; };
private List<URL> sources; private List<URL> sources;
@ -62,6 +66,17 @@ public class RelaunchClassLoader extends URLClassLoader
{ {
return cachedClasses.get(name); return cachedClasses.get(name);
} }
for (String st : transformerExclusions)
{
if (name.startsWith(st))
{
Class<?> cl = super.findClass(name);
cachedClasses.put(name, cl);
return cl;
}
}
try try
{ {
byte[] basicClass = readFully(findResource(name.replace('.', '/').concat(".class")).openStream()); byte[] basicClass = readFully(findResource(name.replace('.', '/').concat(".class")).openStream());