RFR: 8286270: [java.desktop] Replace color search in XColors with a switch statement [v3]

SWinxy duke at openjdk.org
Sat Jul 16 03:17:01 UTC 2022


On Fri, 20 May 2022 00:53:27 GMT, SWinxy <duke at openjdk.org> wrote:

>> The current implementation creates ~750 new objects on load, and uses a binary array search with a Comparable implementation. This implementation is probably bad. Instead, we can use the enhanced switch feature to possibly save time, resources, and code size. The new implementation means that the array doesn't have to be sorted alphanumerically necessarily, and it creates the colors on demand.
>
> SWinxy has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Accidental mergers.
>   
>   I created a quick check to see if any other colors were different (only these three). For some odd reason "yellowgreen" and "yellow green" are different.

I can see which test suites are ran, sure. But they don't give me feedback as to what issues it had (good to know I got an error on the 4282 tests... but which *one*?). The bot removed the "needs sponsor" tag because tests had failed post-hoc (and they've failed for not being able to load stuff prior), so my PR surviving is dependent on those tests.

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

PR: https://git.openjdk.org/jdk/pull/7096



More information about the client-libs-dev mailing list