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

@ -55,11 +55,6 @@ public abstract class Executable extends AccessibleObject
*/
abstract byte[] getAnnotationBytes();
/**
* Accessor method to allow code sharing
*/
abstract Executable getRoot();
/**
* Does the Executable have generic information.
*/
@ -602,7 +597,7 @@ public abstract class Executable extends AccessibleObject
if ((declAnnos = declaredAnnotations) == null) {
synchronized (this) {
if ((declAnnos = declaredAnnotations) == null) {
Executable root = getRoot();
Executable root = (Executable)getRoot();
if (root != null) {
declAnnos = root.declaredAnnotations();
} else {