@@ -128,9 +128,9 @@ public class HTMLDocumentImpl extends DocumentImpl implements HTMLDocument {
128128 *
129129 * @see #createElement
130130 */
131- private static final FastHashMap <String , ElementTypesHTMLHolder > elementTypesHTMLLower_
131+ private static final FastHashMap <String , ElementTypesHTMLHolder > ELEMENT_TYPES_HTML_LOWER
132132 = new FastHashMap <>(11 , 0.5f );
133- private static final FastHashMap <String , ElementTypesHTMLHolder > elementTypesHTMLUpper_
133+ private static final FastHashMap <String , ElementTypesHTMLHolder > ELEMENT_TYPES_HTML_UPPER
134134 = new FastHashMap <>(11 , 0.5f );
135135
136136 /**
@@ -139,7 +139,7 @@ public class HTMLDocumentImpl extends DocumentImpl implements HTMLDocument {
139139 *
140140 * @see #createElement
141141 */
142- private static final Class <?>[] elemClassSigHTML_ = new Class [] {HTMLDocumentImpl .class , String .class };
142+ private static final Class <?>[] ELEMENT_CLASS_CTOR_SIGNATURE = new Class [] {HTMLDocumentImpl .class , String .class };
143143
144144 static {
145145 final Map <String , Class <? extends HTMLElementImpl >> tMap = new HashMap <>();
@@ -220,11 +220,11 @@ public class HTMLDocumentImpl extends DocumentImpl implements HTMLDocument {
220220 final String lKey = key .toLowerCase (Locale .ENGLISH );
221221
222222 try {
223- final Constructor <? extends HTMLElementImpl > ctr = value .getConstructor (elemClassSigHTML_ );
223+ final Constructor <? extends HTMLElementImpl > ctr = value .getConstructor (ELEMENT_CLASS_CTOR_SIGNATURE );
224224
225225 final ElementTypesHTMLHolder holder = new ElementTypesHTMLHolder (uKey , ctr );
226- elementTypesHTMLUpper_ .put (uKey , holder );
227- elementTypesHTMLLower_ .put (lKey , holder );
226+ ELEMENT_TYPES_HTML_UPPER .put (uKey , holder );
227+ ELEMENT_TYPES_HTML_LOWER .put (lKey , holder );
228228 }
229229 catch (NoSuchMethodException | SecurityException ex ) {
230230 throw new IllegalStateException (
@@ -526,12 +526,12 @@ public Element createElement(final String tagName) throws DOMException {
526526 // First, make sure tag name is all upper case, next get the associated
527527 // element class. If no class is found, generate a generic HTML element.
528528 // Do so also if an unexpected exception occurs.
529- ElementTypesHTMLHolder htmlHolder = elementTypesHTMLLower_ .get (tagName );
529+ ElementTypesHTMLHolder htmlHolder = ELEMENT_TYPES_HTML_LOWER .get (tagName );
530530 if (htmlHolder == null ) {
531531 // try uppercase but only if needed and don't use this string to create
532532 // the element but the stored one to keep the memory usage low when the
533533 // tree is kept in memory longer
534- htmlHolder = elementTypesHTMLUpper_ .get (tagName .toUpperCase (Locale .ENGLISH ));
534+ htmlHolder = ELEMENT_TYPES_HTML_UPPER .get (tagName .toUpperCase (Locale .ENGLISH ));
535535 }
536536
537537 if (htmlHolder != null ) {
@@ -690,8 +690,8 @@ protected boolean canRenameElements(final String newNamespaceURI, final String n
690690 }
691691
692692 // check whether a class change is required
693- final Constructor <?> newCtr = elementTypesHTMLUpper_ .get (newNodeName .toUpperCase (Locale .ENGLISH )).ctr_ ;
694- final Constructor <?> oldCtr = elementTypesHTMLUpper_ .get (el .getTagName ().toUpperCase (Locale .ENGLISH )).ctr_ ;
693+ final Constructor <?> newCtr = ELEMENT_TYPES_HTML_UPPER .get (newNodeName .toUpperCase (Locale .ENGLISH )).ctr_ ;
694+ final Constructor <?> oldCtr = ELEMENT_TYPES_HTML_UPPER .get (el .getTagName ().toUpperCase (Locale .ENGLISH )).ctr_ ;
695695 return newCtr == oldCtr ;
696696 }
697697
0 commit comments