Browse files

fix dumb mistake leading to AIOOBEs in Class.getMethod

  • Loading branch information...
1 parent 56253e3 commit d1bdf2f8ef1ccc6ebba8f8f74b8dc8885ff5ce3c @dicej dicej committed Jan 3, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 classpath/java/lang/Class.java
View
2 classpath/java/lang/Class.java
@@ -223,7 +223,7 @@ public Method getMethod(String name, Class ... parameterTypes)
for (VMClass c = vmClass; c != null; c = c.super_) {
int index = Classes.findMethod(c, name, parameterTypes);
if (index >= 0) {
- return new Method(vmClass.methodTable[index]);
+ return new Method(c.methodTable[index]);
}
}
throw new NoSuchMethodException(name);

0 comments on commit d1bdf2f

Please sign in to comment.