On 04/06/2018 14:32, Roger Riggs wrote:
Please review a change to make the values of java.home, user.home, user.dir, and user.name effectively read-only for internal use.  The values are cached during initialization and the
cached values are used.

Webrev:
http://cr.openjdk.java.net/~rriggs/webrev-static-property-8066709/

Issue:
  https://bugs.openjdk.java.net/browse/JDK-8066709

CSR:
  https://bugs.openjdk.java.net/browse/JDK-8204235
Can the @apiNote be split up so that the list of 4 properties moves to an @implNote? Also "changing any standard property" may need clarification as it can mean both changing a system property in a running VM and also changing it by starting the VM with a value for one of these properties.

I think I agree with Max on finding another name for the internal class as it is a class to get the original value of a few critical properties. Also I think we need to look at other ways to do the initialization, maybe in conjunction with VM.saveAndRemoveProperties so that we are saving the initial values of properties in one place.

Are the changes to SocksSocketImpl correct? I may have missed something but the original called System.getProperty("user.dir") in a privileged block so I'm wondering if getUserNameChecked is needed.

The static USER_DIR can be dropped from WindowsFileSystemProvider as there is only one instance of the provider.

The other usages look okay to me.

-Alan

Reply via email to