mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8202113: Reflection API is causing caller classes to leak
Reviewed-by: alanb, plevart
This commit is contained in:
parent
8af434d695
commit
0e1bd1f99d
11 changed files with 434 additions and 16 deletions
|
@ -154,4 +154,9 @@ class ReflectAccess implements jdk.internal.reflect.LangReflectAccess {
|
|||
public <T> Constructor<T> copyConstructor(Constructor<T> arg) {
|
||||
return arg.copy();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T extends AccessibleObject> T getRoot(T obj) {
|
||||
return (T) obj.getRoot();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue