[
https://issues.apache.org/jira/browse/CASSANDRA-18831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18046894#comment-18046894
]
Dmitry Konstantinov commented on CASSANDRA-18831:
-------------------------------------------------
I've looked through the failed TestToJsonSelect tests. It is actually
interesting. The difference is in the float number value formatted as String
using toJson:
we expect: 9.871231{color:#de350b}*2*{color}E7
we get: 9.871231E7
After few extra tests I have reduced it to a plain float formatting code which
gives the same result:
{code:java}
System.out.println("Value: " + Float.parseFloat("98712312.5252")); {code}
The output is different for JDK 11/17 vs JDK 21.
After some search in the internet I found this article and related JDK ticket :
[https://inside.java/2022/09/23/quality-heads-up/] /
[https://bugs.openjdk.org/browse/JDK-4511638]
So, we have a Float.toString behaviour changed since JDK 19.
> JDK21 support
> -------------
>
> Key: CASSANDRA-18831
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18831
> Project: Apache Cassandra
> Issue Type: Task
> Components: Build
> Reporter: Achilles Benetopoulos
> Assignee: Josh McKenzie
> Priority: Normal
> Labels: pull-request-available
> Fix For: 5.x
>
> Attachments: jdk21-patch
>
> Time Spent: 2h
> Remaining Estimate: 0h
>
> This patch builds on the work in CASSANDRA-16895 that added JDK17 to the list
> of supported Java versions, and extends that work to enable building and
> running Cassandra under JDK21.
> The following commits comprise the changes included in the attached patch:
> -
> [https://github.com/apache/cassandra/commit/b15d4d6980e787ab5f3405ca8cb17a9c92a4aa47]
> -
> [https://github.com/apache/cassandra/commit/0c5df38dafe58bfec8924e81507bb604e1543897]
> -
> [https://github.com/apache/cassandra/commit/6506b7279d98eed4b2b65b71e0c6f41eb78c6913]
> -
> [https://github.com/apache/cassandra/commit/564cbd534c5a975cda0c629c14c68c8745b41451]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]