8202113: Reflection API is causing caller classes to leak

Reviewed-by: alanb, plevart
This commit is contained in:
Mandy Chung 2018-05-11 14:21:46 -07:00
parent 8af434d695
commit 0e1bd1f99d
11 changed files with 434 additions and 16 deletions

View file

@ -564,7 +564,6 @@ public class AccessibleObject implements AnnotatedElement {
throw new AssertionError("All subclasses should override this method");
}
// Shared access checking logic.
// For non-public members or members in package-private classes,
@ -674,4 +673,13 @@ public class AccessibleObject implements AnnotatedElement {
}
return printStackWhenAccessFails;
}
/**
* Returns the root AccessibleObject; or null if this object is the root.
*
* All subclasses override this method.
*/
AccessibleObject getRoot() {
throw new InternalError();
}
}