ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gintautas Grigelionis <g.grigelio...@gmail.com>
Subject Re: ant-ivy git commit: IVY-1569 Avoid reflection warnings (or worse) in Java 9+
Date Mon, 05 Feb 2018 05:37:13 GMT
Ivy should be used standalone, so I'd rather implement Jaikiran's
suggestion.
Any comments about moving a public method TestHelper.getCurrentAuthenticator()
over to IvyAuthenticator()?

Gintas

2018-02-05 6:12 GMT+01:00 Stefan Bodewig <bodewig@apache.org>:

> On 2018-02-05, Jaikiran Pai wrote:
>
> > On 02/02/18 11:49 PM, gintas@apache.org 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: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message