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

Phil Race prr at openjdk.java.net
Sun May 8 02:47:37 UTC 2022


On Sat, 15 Jan 2022 03:44:17 GMT, SWinxy <duke at openjdk.java.net> wrote:

> The current implementation creates ~750 new objects on load

Whereas yours creates an un-bounded number .. and changes that two lookups for the same name will return the same "==" object. 

If you can find a compatible way, that avoids both these problems . I can reconsider

src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/XColors.java line 35:

> 33:  * @author Shannon Hickey
> 34:  * @author SWinxy
> 35:  */

You aren't the author, you are changing the file, and if we go anywhere near @author tags it is to remove them, not add them. Plus "Swinxy" is not very professional

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

Changes requested by prr (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/7096



More information about the client-libs-dev mailing list