On Sun, 28 Aug 2022 00:09:11 GMT, ScientificWare <[email protected]> wrote:

>> This is referenced in Java Bug Database as
>> - [JDK-8292276 : Missing color names in 
>> CSS](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8292276)
>> 
>> This is tracked in JBS as 
>> - [JDK-8292276 : Missing color names in 
>> CSS](https://bugs.openjdk.java.net/browse/JDK-8292276)
>> 
>> Adds missing color names, defined by CSS Level 4, in CSS.java :
>> CSS Color Module Level 4
>> W3C Candidate Recommendation Snapshot, 5 July 2022
>> [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color)
>> 
>> Designed from : [ScientificWare JDK-8292276 : Missing color names in 
>> CSS](https://github.com/scientificware/jdk/issues/12)
>
> ScientificWare has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Returns new Color. RGB functions case insensitive.
>   
>   Preserves previous behaviors. Each method call creates a new instance of 
> Color.
>   RGB functions should be treated as case insensitive.

src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1401:

> 1399:         if (str == null) {
> 1400:             return null;
> 1401:         } else if (str.length() == 0) {

ThisĀ canĀ use [`String.isEmpty()`]:
Suggestion:

        } else if (str.isEmpty()) {


[`String.isEmpty()`]: 
https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/String.html#isEmpty()

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

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

Reply via email to