On 2018-02-05, Jaikiran Pai wrote:
> On 02/02/18 11:49 PM, [email protected] wrote:
>> Repository: ant-ivy
>> Updated Branches:
>> refs/heads/master 1d3567f30 -> 7ebc8107a
>> IVY-1569 Avoid reflection warnings (or worse) in Java 9+
>>> private static int getJavaVersion() {
>>> // See
>>> https://docs.oracle.com/javase/8/docs/technotes/guides/versioning/spec/versioning2.html#wp90002
>>> final String[] version =
>>> System.getProperty("java.version").split("\\.");
>>> final int major = Integer.parseInt(version[0]);
>>> return major == 1 ? Integer.parseInt(version[1]) : major;
>>> }
>> }
> I think we should use java.specification.version system property
> instead which is the recommended one as per the JEP
> http://openjdk.java.net/jeps/223. We use this property in Ant too to
> determine the Java version.
Or org.apache.tools.ant.util.JavaEnvUtils#getParsedJavaVersion
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]