-
Enhancement
-
Resolution: Fixed
-
P5
-
17, 18
-
b05
The method javax.swing.plaf.nimbus.NimbusDefaults#getDerivedColor(String,String,float,float,float,int,boolean) could be improved by usage of Map.putIfAbsent instead of separate containsKey/get/put calls. We known that HashMap javax.swing.plaf.nimbus.NimbusDefaults#derivedColors can contain only non-null values. And to check if putIfAbsent was successful or not, we can just compare result with null.
It makes code a bit cleaner and faster.
It makes code a bit cleaner and faster.