Re: [External] : Re: [Text] Java 21 failure with a double

2023-10-23 Thread David Delabassee
Fyi, some background on this https://inside.java/2022/09/23/quality-heads-up/ --David From: Alex Herbert Date: Friday, 20 October 2023 at 10:11 To: Commons Developers List Subject: [External] : Re: [Text] Java 21 failure with a double I've implemented a fix for this in PR 467 [1]. Build

Re: [Text] Java 21 failure with a double

2023-10-20 Thread Gary Gregory
Thank you Alex! The PR is now merged. Gary On Fri, Oct 20, 2023, 4:09 AM Alex Herbert wrote: > I've implemented a fix for this in PR 467 [1]. Builds now pass on JDK 21. > > This does not change the DoubleFormat class. It adds javadoc to state > that the formatting is dependent on Double.toStri

Re: [Text] Java 21 failure with a double

2023-10-20 Thread Alex Herbert
I've implemented a fix for this in PR 467 [1]. Builds now pass on JDK 21. This does not change the DoubleFormat class. It adds javadoc to state that the formatting is dependent on Double.toString. The tests have been updated to use a different range for the random doubles so the tests across form

Re: [Text] Java 21 failure with a double

2023-10-16 Thread Alex Herbert
TLDR; The Double.toString(double) value is different for -9.354004711977437E17 on JDK 21 and earlier JDKs: JDK 21: -9.354004711977437E17 JDK 17: -9.3540047119774374E17 The DoubleFormat class is built upon Double.toString. So the test fails due to this change. --- More details: On JDK 21 Double

Re: [Text] Java 21 failure with a double

2023-10-15 Thread Romain Manni-Bucau
You can always test the java version and adjust the asserts but, without being a [text] expert, I assume the toString usage will create more troubles than helping so can need to be dropped or totally embraced in the main impl. Another option is to request if the JDK dev want to fix it since it as a

Re: [Text] Java 21 failure with a double

2023-10-15 Thread Gary Gregory
Good find Roman, that suspiciously looks like the culprit and causes a mismatch with the tests use of DecimalFormatter. Do you see a way to make the test take this into account? Ty, Gary On Sun, Oct 15, 2023, 2:13 PM Romain Manni-Bucau wrote: > Hi Gary, > > Can't it be > > https://github.com/

Re: [Text] Java 21 failure with a double

2023-10-15 Thread Romain Manni-Bucau
Hi Gary, Can't it be https://github.com/openjdk/jdk/commit/fb605944b5b734c8b47a9122e7ab3d3dcf55f71e ? Long story short, commons-text uses Double.toString which changed due to double (resp float) precision so it impacts tests. Romain Manni-Bucau @rmannibucau | B

[Text] Java 21 failure with a double

2023-10-15 Thread Gary Gregory
Hi all, Can someone explain the 1 test failure on Java 21 in DoubleFornatTest? A one digit difference? Gary