RFR JDK-8066709 Make some JDK system properties read only
Roger Riggs
Roger.Riggs at Oracle.com
Tue Jun 5 15:14:20 UTC 2018
Hi Alan,
On 6/5/2018 5:06 AM, Alan Bateman wrote:
> On 04/06/2018 20:59, Roger Riggs wrote:
>> Hi Alan,
>>
>> Updated webrev in place:
>> http://cr.openjdk.java.net/~rriggs/webrev-static-property-8066709/
> The splitting of the note into @apiNote and @implNote mostly looks
> good. I think it should be "cached by the Java virtual machine" rather
> than "cached internally". It would be good to fix inconsistent line
> length while you are there.
I'm not keen on the abuse of 'Java Virtual Machine' to mean the entire
java runtime.
These values are part of the runtime state, not specifically the JVM.
>
> I still think we need to find a better name for SystemProperty and it
> would be good to re-visit how this is initialized in initPhase1.
I can suggest StaticProperties (but I think it will change back in a
future enhancement).
> I think this is Stuart's point too. It would be nice to call it with
> "props" so that it captures the initial value of the interesting
> properties. A second best would be to a SystemProperties.capture() or
> something explicit.
The values should be static final Strings so they need to be initialized
in the static initializer.
The code can be made more complicated by adding another class but that
does not seem warranted.
System initialization code is know to be sensitive to ordering, etc.
Thanks, Roger
>
> There's something not quite right with the change to SocksSocketImpl
> that I mentioned in the other mail.
>
> -Alan
More information about the core-libs-dev
mailing list