Add in "transform excluded" classes that we still need to take loading responsibility for
This commit is contained in:
parent
b53ce2aa90
commit
e1fc02b5b9
|
@ -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());
|
||||||
|
|
Loading…
Reference in New Issue