On Tue, 3 Mar 2026 06:20:46 GMT, Marius Hanl <[email protected]> wrote:

>> I'd say this might be a good decision to use `long` because throwing an 
>> exception is more expensive in any case.  And, the int32 logic is unlikely 
>> to change ;-)
>
>> The entire premise of this PR is to not use exceptions for flow control. In 
>> addition to that, what could possibly change with a very short algorithm 
>> that parses an int?
> 
> I'm all in for improving the control flow and not throwing exceptions just 
> because we used named colors (lookup).
> And +1 for the resulting performance improvement.
> 
> Just wondering about the particular copy&paste. I also don't think this 
> function will change often in the future. But maintaining the same function 
> again always comes with a bit more maintenance cost still. Thats why I'm 
> asking. 
> 
> I'm fine with whatever we all agree on though!

Just had a look and indeed it did not really changed often in the JDK. What was 
changed more often is the part with the exceptions. So this is probably fine. 
Still would like to see more opinions.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2093#discussion_r2925696803

Reply via email to