Le mer. 9 juin 2021 à 20:58, Alex Herbert <alex.d.herb...@gmail.com> a écrit :
>
> On Wed, 9 Jun 2021 at 17:56, sebb <seb...@gmail.com> wrote:
>
> > On Wed, 9 Jun 2021 at 17:26, Alex Herbert <alex.d.herb...@gmail.com>
> > wrote:
> > >
> > > On Wed, 9 Jun 2021 at 17:03, John Patrick <nhoj.patr...@gmail.com>
> > wrote:
> > >
> > > > Have you tried "9" instead of "1.9"?
> > > >
> > >
> > > I've corrected that in the pom, thanks.
> > >
> > > I think the issue is that Gilles used JDK 8 to try and build it. You can
> > > run using the project's main artifacts using JDK 8, but the build now
> > > requires JDK 9 for the tests and JMH performance tests.
> >
> > That seems wrong. If the code targets Java 8, it must be possible to
> > test it using Java 8.
> >
> > It's possibly OK to require JDK 9 for performance tests.

IIRC, the explicit setting of "JAVA_HOME" was intended to ensure
that the binaries are created with the correct bytecode version.

So, indeed,
$ JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ mvn test site site:stage
does not work with "9" either.

Should we just skip this "validation" test (and solely rely on the compiler
settings in the POM being correct)?


Gilles

>
> The test is using JDK 9 for the BigDecimal sqrt method. This is used to
> compute the exact answer for a Euclidean norm on random input. Since the
> input is random the answers cannot be hard-coded into the test. So this
> test is not possible on JDK 8. The alternative is if the exact computation
> is done using BigDecimal, converted to double, and then a sqrt computed. We
> could change to that instead if there are strong objections here against
> java 9.
>
> The issue with requiring a higher JDK than the target is similar to using
> JDK 8 so that JUnit 5 can be used for the test suite to test code that
> targets a level lower than 1.8.
>
> Alex

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to