RFR: 8072379: Implement jdk.Version and jdk.OracleVersion
Mandy Chung
mandy.chung at oracle.com
Thu Jan 14 15:59:07 UTC 2016
> On Jan 13, 2016, at 9:27 PM, Iris Clark <iris.clark at oracle.com> wrote:
>
> These are the diffs to address both of your comments:
>
> $ diff Version.java_save Version.java
> 28a29,30
>> import java.security.AccessController;
>> import java.security.PrivilegedAction;
> 154,155d155
> < * @see <a href="http://openjdk.java.net/jeps/223">JEP 223: New Version-String Scheme</a>
> < *
> 268a269,274
>> * @throws SecurityException
>> * If a security manager exists and its {@link
>> * SecurityManager#checkPropertyAccess(String)
>> * checkPropertyAccess} method does not allow access to the
>> * system property "java.version"
>> *
> 272,273c278,285
> < if (current == null)
> < current = parse(System.getProperty("java.version"));
> ---
>> if (current == null) {
>> current = parse(AccessController.doPrivileged(
>> new PrivilegedAction<>() {
>> public String run() {
>> return System.getProperty("java.version");
>> }
>> }));
>> }
Looks fine.
Thanks
Mandy
More information about the core-libs-dev
mailing list