RFR JDK-8066709 Make some JDK system properties read only

Weijun Wang weijun.wang at oracle.com
Wed Jun 13 01:59:49 UTC 2018


Hi Roger

1. Should all occurrences of reading of these system properties be updated? For example, the following one is not touched
  http://hg.openjdk.java.net/jdk/jdk/file/4d2e3f5abb48/src/java.base/share/classes/sun/security/tools/keytool/Main.java#l842

2. I assume that with this change not only there is no use calling System.setProperty() in the application but also setting it on the command line is now useless. Is this right? Do we need to make this clear in the CSR?

Thanks
Max


> On Jun 4, 2018, at 9:32 PM, Roger Riggs <Roger.Riggs at oracle.com> 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
> 
> Thanks, Roger
> 
> 



More information about the core-libs-dev mailing list