Skip to content

Commit 90cfd7f

Browse files
committed
cleanup
1 parent 4b00892 commit 90cfd7f

File tree

79 files changed

+6312
-5709
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+6312
-5709
lines changed

pom.xml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>org.htmlunit</groupId>
66
<artifactId>htmlunit-xpath</artifactId>
7-
<version>4.16.0</version>
7+
<version>4.17.0-SNAPSHOT</version>
88
<name>HtmlUnit-XPath</name>
99
<organization>
1010
<name>HtmlUnit</name>
@@ -24,24 +24,26 @@
2424
<maven.compiler.target>8</maven.compiler.target>
2525

2626
<!-- test dependencies -->
27-
<junit.version>5.13.4</junit.version>
27+
<junit.version>5.14.0</junit.version>
2828
<commons-io.version>2.20.0</commons-io.version>
2929

3030
<!-- quality -->
31-
<checkstyle.version>10.26.1</checkstyle.version>
32-
<spotbugs.version>4.9.4</spotbugs.version>
33-
<pmd.version>7.16.0</pmd.version>
31+
<checkstyle.version>11.1.0</checkstyle.version>
32+
<spotbugs.version>4.9.6</spotbugs.version>
33+
<pmd.version>7.17.0</pmd.version>
3434
<dependencycheck.version>10.0.4</dependencycheck.version>
3535

3636
<!-- plugins -->
37-
<central-publishing-plugin.version>0.8.0</central-publishing-plugin.version>
37+
<central-publishing-plugin.version>0.9.0</central-publishing-plugin.version>
3838
<checkstyle-plugin.version>3.6.0</checkstyle-plugin.version>
3939
<pmd-plugin.version>3.27.0</pmd-plugin.version>
40-
<spotbugs-plugin.version>4.9.4.0</spotbugs-plugin.version>
40+
<spotbugs-plugin.version>4.9.6.0</spotbugs-plugin.version>
4141
<gpg-plugin.version>3.2.8</gpg-plugin.version>
42-
<enforcer-plugin.version>3.6.1</enforcer-plugin.version>
42+
<enforcer-plugin.version>3.6.2</enforcer-plugin.version>
43+
<compiler-plugin.version>3.14.1</compiler-plugin.version>
4344
<jar-plugin.version>3.4.2</jar-plugin.version>
44-
<javadoc-plugin.version>3.11.3</javadoc-plugin.version>
45+
<javadoc-plugin.version>3.12.0</javadoc-plugin.version>
46+
<surefire-plugin.version>3.5.4</surefire-plugin.version>
4547
</properties>
4648

4749
<dependencies>
@@ -63,11 +65,11 @@
6365
<plugins>
6466
<plugin>
6567
<artifactId>maven-compiler-plugin</artifactId>
66-
<version>3.14.0</version>
68+
<version>${compiler-plugin.version}</version>
6769
</plugin>
6870
<plugin>
6971
<artifactId>maven-surefire-plugin</artifactId>
70-
<version>3.5.3</version>
72+
<version>${surefire-plugin.version}</version>
7173
</plugin>
7274
<plugin>
7375
<artifactId>maven-jar-plugin</artifactId>

src/main/java/org/htmlunit/xpath/Expression.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import javax.xml.transform.ErrorListener;
2121
import javax.xml.transform.TransformerException;
22+
2223
import org.htmlunit.xpath.objects.XObject;
2324
import org.htmlunit.xpath.res.XPATHErrorResources;
2425
import org.htmlunit.xpath.res.XPATHMessages;

src/main/java/org/htmlunit/xpath/NodeSet.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import java.util.ArrayList;
2121
import java.util.List;
22+
2223
import org.w3c.dom.Node;
2324
import org.w3c.dom.NodeList;
2425

src/main/java/org/htmlunit/xpath/XPath.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import javax.xml.transform.ErrorListener;
2121
import javax.xml.transform.SourceLocator;
2222
import javax.xml.transform.TransformerException;
23+
2324
import org.htmlunit.xpath.compiler.Compiler;
2425
import org.htmlunit.xpath.compiler.FunctionTable;
2526
import org.htmlunit.xpath.compiler.XPathParser;

src/main/java/org/htmlunit/xpath/XPathAPI.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package org.htmlunit.xpath;
1919

2020
import javax.xml.transform.TransformerException;
21+
2122
import org.htmlunit.xpath.objects.XObject;
2223
import org.htmlunit.xpath.xml.utils.PrefixResolver;
2324
import org.htmlunit.xpath.xml.utils.PrefixResolverDefault;
@@ -153,7 +154,7 @@ public static NodeList selectNodeList(
153154
*
154155
* @param contextNode The node to start searching from.
155156
* @param str A valid XPath string.
156-
* @return An XObject, which can be used to obtain a string, number, nodelist, etc, should never
157+
* @return An XObject, which can be used to obtain a string, number, nodelist, etc., should never
157158
* be null.
158159
* @see org.htmlunit.xpath.objects.XObject
159160
* @see org.htmlunit.xpath.objects.XBoolean
@@ -174,7 +175,7 @@ public static XObject eval(final Node contextNode, final String str) throws Tran
174175
* @param contextNode The node to start searching from.
175176
* @param str A valid XPath string.
176177
* @param namespaceNode The node from which prefixes in the XPath will be resolved to namespaces.
177-
* @return An XObject, which can be used to obtain a string, number, nodelist, etc, should never
178+
* @return An XObject, which can be used to obtain a string, number, nodelist, etc., should never
178179
* be null.
179180
* @see org.htmlunit.xpath.objects.XObject
180181
* @see org.htmlunit.xpath.objects.XBoolean
@@ -185,7 +186,7 @@ public static XObject eval(final Node contextNode, final String str) throws Tran
185186
public static XObject eval(final Node contextNode, final String str, final Node namespaceNode)
186187
throws TransformerException {
187188

188-
// Since we don't have a XML Parser involved here, install some default support
189+
// Since we don't have an XML Parser involved here, install some default support
189190
// for things like namespaces, etc.
190191
// (Changed from: XPathContext xpathSupport = new XPathContext();
191192
// because XPathContext is weak in a number of areas... perhaps
@@ -224,7 +225,7 @@ public static XObject eval(final Node contextNode, final String str, final Node
224225
* @param str A valid XPath string.
225226
* @param prefixResolver Will be called if the parser encounters namespace prefixes, to resolve
226227
* the prefixes to URLs.
227-
* @return An XObject, which can be used to obtain a string, number, nodelist, etc, should never
228+
* @return An XObject, which can be used to obtain a string, number, nodelist, etc., should never
228229
* be null.
229230
* @see org.htmlunit.xpath.objects.XObject
230231
* @see org.htmlunit.xpath.objects.XBoolean
@@ -236,7 +237,7 @@ public static XObject eval(
236237
final Node contextNode, final String str, final PrefixResolver prefixResolver)
237238
throws TransformerException {
238239

239-
// Since we don't have a XML Parser involved here, install some default support
240+
// Since we don't have an XML Parser involved here, install some default support
240241
// for things like namespaces, etc.
241242
// (Changed from: XPathContext xpathSupport = new XPathContext();
242243
// because XPathContext is weak in a number of areas... perhaps

src/main/java/org/htmlunit/xpath/XPathContext.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
package org.htmlunit.xpath;
1919

2020
import java.util.Stack;
21+
2122
import javax.xml.transform.ErrorListener;
2223
import javax.xml.transform.URIResolver;
24+
2325
import org.htmlunit.xpath.axes.SubContextList;
2426
import org.htmlunit.xpath.res.XPATHErrorResources;
2527
import org.htmlunit.xpath.res.XPATHMessages;

src/main/java/org/htmlunit/xpath/axes/AttributeIterator.java

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,35 +20,41 @@
2020
import org.htmlunit.xpath.compiler.Compiler;
2121
import org.htmlunit.xpath.xml.dtm.DTM;
2222

23-
/** This class implements an optimized iterator for attribute axes patterns. */
23+
/**
24+
* This class implements an optimized iterator for attribute axes patterns.
25+
*/
2426
public class AttributeIterator extends ChildTestIterator {
2527

26-
/**
27-
* Create a AttributeIterator object.
28-
*
29-
* @param compiler A reference to the Compiler that contains the op map.
30-
* @param opPos The position within the op map, which contains the location path expression for
31-
* this iterator.
32-
* @throws javax.xml.transform.TransformerException if any
33-
*/
34-
AttributeIterator(final Compiler compiler, final int opPos, final int analysis)
35-
throws javax.xml.transform.TransformerException {
36-
super(compiler, opPos, analysis);
37-
}
28+
/**
29+
* Create a AttributeIterator object.
30+
*
31+
* @param compiler A reference to the Compiler that contains the op map.
32+
* @param opPos The position within the op map, which contains the location path expression for
33+
* this iterator.
34+
* @throws javax.xml.transform.TransformerException if any
35+
*/
36+
AttributeIterator(final Compiler compiler, final int opPos, final int analysis)
37+
throws javax.xml.transform.TransformerException {
38+
super(compiler, opPos, analysis);
39+
}
3840

39-
/** {@inheritDoc} */
40-
@Override
41-
protected int getNextNode() {
42-
m_lastFetched =
43-
(DTM.NULL == m_lastFetched)
44-
? m_cdtm.getFirstAttribute(m_context)
45-
: m_cdtm.getNextAttribute(m_lastFetched);
46-
return m_lastFetched;
47-
}
41+
/**
42+
* {@inheritDoc}
43+
*/
44+
@Override
45+
protected int getNextNode() {
46+
m_lastFetched =
47+
(DTM.NULL == m_lastFetched)
48+
? m_cdtm.getFirstAttribute(m_context)
49+
: m_cdtm.getNextAttribute(m_lastFetched);
50+
return m_lastFetched;
51+
}
4852

49-
/** {@inheritDoc} */
50-
@Override
51-
public int getAxis() {
52-
return org.htmlunit.xpath.xml.dtm.Axis.ATTRIBUTE;
53-
}
53+
/**
54+
* {@inheritDoc}
55+
*/
56+
@Override
57+
public int getAxis() {
58+
return org.htmlunit.xpath.xml.dtm.Axis.ATTRIBUTE;
59+
}
5460
}

0 commit comments

Comments
 (0)