Skip to content

Commit

Permalink
checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Nov 21, 2024
1 parent 9a4b524 commit eb6b82a
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/htmlunit/cyberneko/HTMLTagBalancer.java
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public void reset(final XMLComponentManager manager)
fragmentContextStack_ = (QName[]) manager.getProperty(FRAGMENT_CONTEXT_STACK);
if (fragmentContextStack_ != null) {
fSeenAnything = fragmentContextStack_.length > 0;
for (QName qname : fragmentContextStack_) {
for (final QName qname : fragmentContextStack_) {
if ("html".equalsIgnoreCase(qname.getLocalpart())) {
fSeenRootElement = true;
fSeenRealHtmlElement = true;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/htmlunit/cyberneko/LocationItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,4 @@ public String toString() {
str.append(endCharacterOffset_);
return str.toString();
}
}
}
2 changes: 1 addition & 1 deletion src/main/java/org/htmlunit/cyberneko/SynthesizedItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ public Augmentations clone() {
public String toString() {
return "synthesized";
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ protected void printStartElement(final QName element, final XMLAttributes attrib
// modify META[@http-equiv='content-type']/@content value
int contentIndex = -1;
String originalContent = null;
if (element.getRawname().equalsIgnoreCase("meta")) {
if ("meta".equalsIgnoreCase(element.getRawname())) {
String httpEquiv = null;
final int length = attributes.getLength();
for (int i = 0; i < length; i++) {
Expand All @@ -246,7 +246,7 @@ else if ("content".equals(aname)) {
contentIndex = i;
}
}
if (httpEquiv != null && httpEquiv.equalsIgnoreCase("content-type")) {
if ("content-type".equalsIgnoreCase(httpEquiv)) {
String content = null;
if (contentIndex != -1) {
originalContent = attributes.getValue(contentIndex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public static String formatMessage(final String key, final Object[] arguments) t
return msg;
}
catch (final MissingResourceException e) {
MissingResourceException mre = new MissingResourceException(key, DomResourceBundle_.getString("BadMessageKey"), key);
final MissingResourceException mre = new MissingResourceException(key, DomResourceBundle_.getString("BadMessageKey"), key);
mre.initCause(e);
throw mre;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static String formatMessage(final String key, final Object[] arguments) t
return msg;
}
catch (final MissingResourceException e) {
MissingResourceException mre = new MissingResourceException(key, SAXResourceBundle_.getString("BadMessageKey"), key);
final MissingResourceException mre = new MissingResourceException(key, SAXResourceBundle_.getString("BadMessageKey"), key);
mre.initCause(e);
throw mre;
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/htmlunit/cyberneko/xerces/util/URI.java
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ private void initializeScheme(final String uriSpec) throws MalformedURIException
index++;
}

String scheme = uriSpec.substring(0, index);
final String scheme = uriSpec.substring(0, index);
if (scheme.length() == 0) {
throw new MalformedURIException("No scheme found in URI.");
}
Expand Down Expand Up @@ -804,7 +804,7 @@ private boolean initializeAuthority(final String uriSpec) {
}
}

String host = uriSpec.substring(start, index);
final String host = uriSpec.substring(start, index);
int port = -1;
if (host.length() > 0) {
// port
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public XMLAttributesImpl() {

/** Copy constructor. */
public XMLAttributesImpl(final XMLAttributesImpl attributes) {
ArrayList<Attribute> attribs = attributes.getAttributes();
final ArrayList<Attribute> attribs = attributes.getAttributes();
final int length = attribs.size();
if (length > 0) {
attributes_ = new ArrayList<>(length);
Expand Down Expand Up @@ -478,7 +478,7 @@ public String getValue(final String uri, final String localName) {
* {@inheritDoc}
*/
@Override
public String getNonNormalizedValue(int index) {
public String getNonNormalizedValue(final int index) {
if (index < 0 || index >= getLength()) {
return null;
}
Expand Down

0 comments on commit eb6b82a

Please sign in to comment.