On Tue, 10 Feb 2026 20:18:32 GMT, Michael Strauß <[email protected]> wrote:
>> I don't know. The new parser parses "-0.0" as -0.0, and while (-0.0 ==
>> 0.0), the result of some other operations is different (1/-0.0 = -Infinity).
>>
>> Does it constitutes a regression risk for applications?
>
> `CssNumberParser` parses "-0" correctly as -0, just like
> `Double.parseDouble()` currently does. The existing code in `Color` is
> unchanged.
Since this file is testing the parser and not the CSS handling of negative
zeros, I think we should test for the results if parsing "0.0" and "-0.0".
For example:
assertEquals(Double.valueOf(0.0), Double.valueOf(parseDouble("0.0"));
assertEquals(Double.valueOf(-0.0), Double.valueOf(parseDouble("-0.0"));
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2069#discussion_r2805696464