RFR: 8377427: Reduce substring allocations in Color.web(String, double) [v2]
Michael Strauß
mstrauss at openjdk.org
Fri Feb 13 20:40:35 UTC 2026
On Fri, 13 Feb 2026 19:17:43 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/javafx/scene/paint/Color.java line 437:
>>
>>> 435:
>>> 436: if (len == 3) {
>>> 437: r = Integer.parseInt(colorString, offset, offset + 1, 16);
>>
>> would a switch statement be better in this case (e.g. case when len == 1)?
>
> would it?
I've replaced it with a switch expression.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2069#discussion_r2805999314
More information about the openjfx-dev
mailing list