add classloader parameter to functions which may directly or indirectly load classes; include methods inherited from interfaces (but not explicitly declared) in method tables and virtual tables of abstract classes

This commit is contained in:
Joel Dice
2009-08-10 07:56:16 -06:00
parent 54bb64cfb2
commit 001000364d
12 changed files with 429 additions and 186 deletions

View File

@ -33,7 +33,8 @@ public abstract class ClassLoader {
return ClassLoader.class.getClassLoader();
}
private static native Class defineClass(byte[] b, int offset, int length);
private static native Class defineClass
(ClassLoader loader, byte[] b, int offset, int length);
protected Class defineClass(String name, byte[] b, int offset, int length) {
if (b == null) {
@ -44,7 +45,7 @@ public abstract class ClassLoader {
throw new IndexOutOfBoundsException();
}
return defineClass(b, offset, length);
return defineClass(this, b, offset, length);
}
protected Class findClass(String name) throws ClassNotFoundException {