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 eb6b82a commit 24a2d28
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/main/java/org/htmlunit/cyberneko/HTMLScanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -2128,9 +2128,9 @@ else if (c == '/') {

if ("script".equals(enameLC)) {
if (!fAllowSelfclosingScript_) {
setScanner(fScriptScanner);
setScannerState(STATE_CONTENT);
return true;
setScanner(fScriptScanner);
setScannerState(STATE_CONTENT);
return true;
}
}
else if (!fAllowSelfclosingTags_ && !fAllowSelfclosingIframe_ && "iframe".equals(enameLC)) {
Expand Down Expand Up @@ -2571,7 +2571,7 @@ protected boolean scanCDataContent(final XMLString xmlString) throws IOException
}
break;
}
else if (fCDATAEarlyClosing_&& c == '>') {
else if (fCDATAEarlyClosing_ && c == '>') {
// don't add the ]] to the buffer
return false;
}
Expand Down
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 @@ -1017,7 +1017,7 @@ public void characters(final XMLString text, final Augmentations augs) throws XN
// strange code but it is worth the price
int whitespace = -1;
if (fElementStack.top < 2 || endElementsBuffer_.size() == 1) {
whitespace = text.isWhitespace() ? 1: 0;
whitespace = text.isWhitespace() ? 1 : 0;
if (whitespace == 1) {
// ignore spaces directly within <html>
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ String capitalize(final String value) {
if (value.length() > 0) {
final char[] chars = value.toCharArray();
chars[0] = Character.toUpperCase(chars[0]);
for (int i=1; i < chars.length; ++i) {
for (int i = 1; i < chars.length; ++i) {
chars[i] = Character.toLowerCase(chars[i]);
}
return String.valueOf(chars);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,5 @@ void startDocument(XMLLocator locator, String encoding, NamespaceContext namespa
void setDocumentSource(XMLDocumentSource source);

/** @return the document source. */
XMLDocumentSource getDocumentSource();}
XMLDocumentSource getDocumentSource();
}
2 changes: 1 addition & 1 deletion src/test/java/org/htmlunit/cyberneko/Writer.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public void startElement(final QName element, final XMLAttributes attrs, final A
out_.print(' ');
print(attrs.getValue(aname));

if(anamesNonNormalized[i] != null && !anamesNonNormalized[i].equals(attrs.getValue(aname))) {
if (anamesNonNormalized[i] != null && !anamesNonNormalized[i].equals(attrs.getValue(aname))) {
out_.print(" / ");
out_.print(anamesNonNormalized[i]);
}
Expand Down

0 comments on commit 24a2d28

Please sign in to comment.