Review Request JDK-8202113: Reflection API is causing caller classes to leak

mandy chung mandy.chung at oracle.com
Fri May 11 16:09:05 UTC 2018



On 4/30/18 10:21 AM, Alan Bateman wrote:
>
> The updated webrev looks good. A minor comment is that I assume you 
> can remove the cast from Executable::declaredAnnotations if you leave 
> Executable::getRoot in place.

It could but leave it as is.  I found that this change breaks the hack 
that uses reflection to change a static final field by changing the 
private modifiers field in the Field object. That is a terrible hack but 
I think it's better to separate this incompatibility from this issue.  I 
modified the fix to change the modifiers of the root and child field 
object be the same.

http://cr.openjdk.java.net/~mchung/jdk11/webrevs/8202113/webrev.02/

Mandy


More information about the core-libs-dev mailing list