We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 526951d commit 0110acaCopy full SHA for 0110aca
src/java.desktop/share/classes/javax/swing/text/html/CSS.java
@@ -735,12 +735,8 @@ public CSS() {
735
valueConvertor.put(CSS.Attribute.BACKGROUND_ATTACHMENT,
736
valueMapper);
737
Object generic = new CssValue();
738
- int n = CSS.Attribute.allAttributes.length;
739
- for (int i = 0; i < n; i++) {
740
- CSS.Attribute key = CSS.Attribute.allAttributes[i];
741
- if (valueConvertor.get(key) == null) {
742
- valueConvertor.put(key, generic);
743
- }
+ for (CSS.Attribute key : CSS.Attribute.allAttributes) {
+ valueConvertor.putIfAbsent(key, generic);
744
}
745
746
0 commit comments