RFR: 8377427: Reduce substring allocations in Color.web(String, double) [v16]

Andy Goryachev angorya at openjdk.org
Mon Feb 23 21:55:01 UTC 2026


On Mon, 23 Feb 2026 21:33:21 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:

>> Color.web(string, double) parses a color string by creating substrings of the input. These string allocations can be removed.
>> 
>> CSS numbers are parsed by `CssNumberParser`, which parses CSS-compliant numbers using Lemire's algorithm.
>> 
>> There are no new tests for the `Color` class, since the existing tests already cover all relevant code paths.
>
> Michael Strauß has updated the pull request incrementally with one additional commit since the last revision:
> 
>   review comment

Could you update the ticket (and maybe PR) about the differences related to whitespace handling (trim() vs isWhitespace)?  It's unlikely that anyone would notice, no one is going to see the difference.

@kevinrushforth do you think this needs a CSR? (I don't think so, but who knows)

-------------

PR Comment: https://git.openjdk.org/jfx/pull/2069#issuecomment-3947522247


More information about the openjfx-dev mailing list