Skip to content

Commit 5643524

Browse files
committed
checkstyle
1 parent 3b4684c commit 5643524

6 files changed

Lines changed: 21 additions & 21 deletions

File tree

src/main/java/org/htmlunit/cyberneko/HTMLConfiguration.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,35 +267,35 @@ public XMLErrorHandler getErrorHandler() {
267267
}
268268

269269
/**
270-
* {@inheritDoc}
270+
* @return the configured {@link HTMLElements}
271271
*/
272272
public HTMLElements getHtmlElements() {
273273
return htmlElements_;
274274
}
275275

276276
/**
277-
* {@inheritDoc}
277+
* @return the configured {@link List} of {@link HTMLComponent}'s
278278
*/
279279
public List<HTMLComponent> getHtmlComponents() {
280280
return htmlComponents_;
281281
}
282282

283283
/**
284-
* {@inheritDoc}
284+
* @return the configured {@link HTMLScanner}
285285
*/
286286
public HTMLScanner getDocumentScanner() {
287287
return documentScanner_;
288288
}
289289

290290
/**
291-
* {@inheritDoc}
291+
* @return the configured {@link HTMLTagBalancer}
292292
*/
293293
public HTMLTagBalancer getTagBalancer() {
294294
return tagBalancer_;
295295
}
296296

297297
/**
298-
* {@inheritDoc}
298+
* @return the configured {@link NamespaceBinder}
299299
*/
300300
public NamespaceBinder getNamespaceBinder() {
301301
return namespaceBinder_;

src/main/java/org/htmlunit/cyberneko/HTMLScanner.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ public static String systemId(final String systemId, final String baseSystemId)
10051005
.replaceAll(" ", "%20");
10061006

10071007
}
1008-
catch (final SecurityException se) {
1008+
catch (final SecurityException ignored) {
10091009
dir = "";
10101010
}
10111011
if (!dir.endsWith("/")) {
@@ -1024,7 +1024,7 @@ public static String systemId(final String systemId, final String baseSystemId)
10241024
// deal with blanks in paths; maybe we have to do better uri encoding here
10251025
.replaceAll(" ", "%20");
10261026
}
1027-
catch (final SecurityException se) {
1027+
catch (final SecurityException ignored) {
10281028
dir = "";
10291029
}
10301030
if (baseSystemId.indexOf(':') != -1) {
@@ -3656,7 +3656,7 @@ static boolean isEncodingCompatible(final String encoding1, final String encodin
36563656
try {
36573657
return canRoundtrip(encoding2, encoding1);
36583658
}
3659-
catch (final UnsupportedOperationException e1) {
3659+
catch (final UnsupportedOperationException ignored) {
36603660
// encoding2 only supports decode too. Time to give up.
36613661
return false;
36623662
}

src/main/java/org/htmlunit/cyberneko/html/dom/HTMLButtonElementImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public int getTabIndex() {
6868
try {
6969
return Integer.parseInt(getAttribute("tabindex"));
7070
}
71-
catch (final NumberFormatException except) {
71+
catch (final NumberFormatException expected) {
7272
return 0;
7373
}
7474
}

src/main/java/org/htmlunit/cyberneko/html/dom/HTMLDocumentImpl.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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

src/main/java/org/htmlunit/cyberneko/html/dom/HTMLInputElementImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public int getTabIndex() {
172172
try {
173173
return Integer.parseInt(getAttribute("tabindex"));
174174
}
175-
catch (final NumberFormatException except) {
175+
catch (final NumberFormatException expected) {
176176
return 0;
177177
}
178178
}

src/main/java/org/htmlunit/cyberneko/html/dom/HTMLObjectElementImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public int getTabIndex() {
150150
try {
151151
return Integer.parseInt(getAttribute("tabindex"));
152152
}
153-
catch (final NumberFormatException except) {
153+
catch (final NumberFormatException expected) {
154154
return 0;
155155
}
156156
}

0 commit comments

Comments
 (0)