Skip to content

Commit 3f6db6d

Browse files
committed
checkstyle
1 parent 1b8230d commit 3f6db6d

11 files changed

Lines changed: 25 additions & 22 deletions

File tree

checkstyle.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@
256256
<module name="FinalClass"/>
257257
<module name="HideUtilityClassConstructor"/>
258258
<module name="InterfaceIsType"/>
259-
<module name="VisibilityModifier"/>
259+
<!--module name="VisibilityModifier"/-->
260260

261261
<!-- Miscellaneous other checks. -->
262262
<!-- See http://checkstyle.sf.net/config_misc.html -->
@@ -268,7 +268,6 @@
268268
<property name="tokens" value="VARIABLE_DEF,PARAMETER_DEF"/>
269269
<property name="validateEnhancedForLoopVariable" value="true"/>
270270
</module>
271-
<module name="HiddenField"/>
272271
<module name="MissingOverride"/>
273272
</module>
274273
</module>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,7 @@ else if (c == '\r') {
17041704
// infoset utility methods
17051705

17061706
// Returns an augmentations object with a location item added.
1707-
protected final Augmentations locationAugs(CurrentEntity currentEntity) {
1707+
protected final Augmentations locationAugs(final CurrentEntity currentEntity) {
17081708
// we don't have to create a new LocationItem all the time, because the interface says:
17091709
// Methods that receive Augmentations are required to copy the information
17101710
// if it is to be saved for use beyond the scope of the method.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ else if (fTemplateFragment
782782
// nothing, don't force/check parent for the direct template children
783783
}
784784
else if (!fSeenRootElement && !fDocumentFragment) {
785-
String pname = preferedParent.name;
785+
final String pname = preferedParent.name;
786786
if (fReportErrors) {
787787
final String ename = elem.getRawname();
788788
fErrorReporter.reportWarning("HTML2002", new Object[]{ename, modifyName(pname, fNamesElems)});

src/main/java/org/htmlunit/cyberneko/xerces/dom/ParentNode.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ public abstract class ParentNode extends ChildNode {
6767
/** First child. */
6868
protected ChildNode firstChild = null;
6969

70-
/** NodeList cache */
70+
/** NodeList cache. */
7171
protected NodeListCache fNodeListCache = null;
7272

7373
/**
7474
* No public constructor; only subclasses of ParentNode should be instantiated,
75-
* and those normally via a Document's factory methods
75+
* and those normally via a Document's factory methods.
7676
*
7777
* @param ownerDocument the owner document
7878
*/
@@ -461,7 +461,8 @@ Node internalRemoveChild(final Node oldChild, final boolean replace) throws DOME
461461
final CoreDocumentImpl ownerDoc = ownerDocument();
462462
if (ownerDoc.errorChecking) {
463463
if (oldChild != null && oldChild.getParentNode() != this) {
464-
throw new DOMException(DOMException.NOT_FOUND_ERR, DOMMessageFormatter.formatMessage("NOT_FOUND_ERR", null));
464+
throw new DOMException(DOMException.NOT_FOUND_ERR,
465+
DOMMessageFormatter.formatMessage("NOT_FOUND_ERR", null));
465466
}
466467
}
467468

src/main/java/org/htmlunit/cyberneko/xerces/dom/TextImpl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public String getWholeText() {
103103

104104
/**
105105
* internal method taking a StringBuffer in parameter and inserts the text
106-
* content at the start of the buffer
106+
* content at the start of the buffer.
107107
*
108108
* @param builder string buffer
109109
* @throws DOMException on error
@@ -496,7 +496,8 @@ private boolean hasTextOnlyChildren(final Node node) {
496496
@Override
497497
public Text splitText(final int offset) throws DOMException {
498498
if (offset < 0 || offset > data_.length()) {
499-
throw new DOMException(DOMException.INDEX_SIZE_ERR, DOMMessageFormatter.formatMessage("INDEX_SIZE_ERR", null));
499+
throw new DOMException(DOMException.INDEX_SIZE_ERR,
500+
DOMMessageFormatter.formatMessage("INDEX_SIZE_ERR", null));
500501
}
501502

502503
// split text into two separate nodes

src/main/java/org/htmlunit/cyberneko/xerces/xni/NamespaceContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public interface NamespaceContext {
3232
/**
3333
* XML Information Set REC all namespace attributes (including those named
3434
* xmlns, whose [prefix] property has no value) have a namespace URI of
35-
* http://www.w3.org/2000/xmlns/
35+
* http://www.w3.org/2000/xmlns/.
3636
*/
3737
String XMLNS_URI = "http://www.w3.org/2000/xmlns/";
3838

src/test/java/org/htmlunit/cyberneko/CanonicalSAXTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ public void runTest(final File dataFile) throws Exception {
6666
verify(dataFile, saxDataLines);
6767
}
6868

69-
70-
private static void verify(final File dataFile, final String saxDataLines) throws IOException, AssertionFailedError {
69+
private static void verify(final File dataFile, final String saxDataLines)
70+
throws IOException, AssertionFailedError {
7171
try {
7272
// prepare for future changes where canonical files are next to test file
7373
File canonicalFile = new File(dataFile.getParentFile(), dataFile.getName() + ".canonical-sax");

src/test/java/org/htmlunit/cyberneko/CanonicalXNITest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ private static String getResult(final File infile) throws Exception {
103103
htmlConfiguration.setFeature(HTMLConfiguration.AUGMENTATIONS, true);
104104
htmlConfiguration.setDocumentHandler(parser);
105105

106-
107106
final String normalized = getCanonical(infile);
108-
htmlConfiguration.parse(new XMLInputSource(null, null, null, new StringReader(normalized), StandardCharsets.UTF_8.name()));
107+
htmlConfiguration.parse(new XMLInputSource(null, null, null,
108+
new StringReader(normalized), StandardCharsets.UTF_8.name()));
109109

110110
final StringBuilder sb = new StringBuilder();
111111

src/test/java/org/htmlunit/cyberneko/HTMLTagBalancingListenerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public void ignoredTags() throws Exception {
6565
}
6666

6767
/**
68-
* HTMLTagBalancer field fSeenFramesetElement was not correctly reset as of 1.19.17
68+
* HTMLTagBalancer field fSeenFramesetElement was not correctly reset as of 1.19.17.
6969
* @throws Exception on error
7070
*/
7171
@Test
@@ -97,8 +97,8 @@ private static final class TestParser extends AbstractSAXParser implements HTMLT
9797
}
9898

9999
@Override
100-
public void startElement(final QName element, final XMLAttributes attributes, final Augmentations augs) throws XNIException {
101-
100+
public void startElement(final QName element, final XMLAttributes attributes,
101+
final Augmentations augs) throws XNIException {
102102
messages_.add("start " + element.getRawname());
103103
super.startElement(element, attributes, augs);
104104
}

src/test/java/org/htmlunit/cyberneko/HeadNamespaceBugTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
public class HeadNamespaceBugTest {
3636

3737
/**
38-
* Ensure that the inserted head element has the right namespace
38+
* Ensure that the inserted head element has the right namespace.
3939
*/
4040
@Test
4141
public void headNamespace() throws Exception {
@@ -48,7 +48,8 @@ public void startElement(final String ns, final String name, final String qName,
4848
}
4949
};
5050
final InputSource source = new InputSource();
51-
source.setByteStream(new ByteArrayInputStream("<html xmlns='http://www.w3.org/1999/xhtml'><body/></html>".getBytes()));
51+
source.setByteStream(new ByteArrayInputStream(
52+
"<html xmlns='http://www.w3.org/1999/xhtml'><body/></html>".getBytes()));
5253
final HTMLConfiguration conf = new HTMLConfiguration();
5354
conf.setFeature("http://cyberneko.org/html/features/insert-namespaces", true);
5455
final AbstractSAXParser parser = new AbstractSAXParser(conf) { };

0 commit comments

Comments
 (0)