Skip to content

Commit

Permalink
JDK 1.8 handles IEEE 754 differently than later JDKs. Finding issues …
Browse files Browse the repository at this point in the history
…with JDK from Maven Central. Committing because I cannot repeat these floating point bugs locally with JDK 1.8 -> 21.
  • Loading branch information
jdereg committed Feb 13, 2024
1 parent f8650e3 commit f7d0f08
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,7 @@ public TimeZone getTimeZone() {
{ Float.MIN_VALUE, "1.4E-45" },
{ -Float.MAX_VALUE, "-3.4028235E38" },
{ Float.MAX_VALUE, "3.4028235E38" },
{ 123456789f, "1.23456792E8" },
{ 12345679f, "1.2345679E7" },
{ 0.000000123456789f, "1.2345679E-7" },
{ 12345f, "12345.0" },
{ 0.00012345f, "1.2345E-4" },
Expand Down Expand Up @@ -1689,15 +1689,10 @@ void testConvert(String shortNameSource, String shortNameTarget, Object source,
Object actual = converter.convert(source, targetClass);
try {
assertEquals(target, actual);
}
catch (Throwable e) {
throw new RuntimeException(e);
} catch (Throwable e) {
System.err.println(shortNameSource + "[" + source + "] ==> " + shortNameTarget + "[" + target + "] Failed");
throw e;
}
}
}

@Test
void testStuff()
{
}
}

0 comments on commit f7d0f08

Please sign in to comment.