> On Jan 13, 2016, at 9:27 PM, Iris Clark <iris.cl...@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

Reply via email to