Review Request JDK-8202113: Reflection API is causing caller classes to leak
Alan Bateman
Alan.Bateman at oracle.com
Mon May 14 16:11:39 UTC 2018
On 14/05/2018 16:43, Peter Levart wrote:
> :
>
> Is it really that important to allow users to modify static final
> fields that way? As such fields are normally constant folded by JIT, I
> doubt that anybody is doing it nowadays. Doing it is bound to
> unpredictable program behavior, as JVM is free to never reload such
> field's value.
Sadly, there are still a number of libraries using this hack to change
static final fields. They should be seeing an "Illegal reflective ..."
warning today and the hack will break once the encapsulation is dialed
up. The torch and pitchfork crowd will be out when that happens and I
read Mandy's approach as just leaving the issue to that day.
-Alan
More information about the core-libs-dev
mailing list