Skip to content

Commit b70c0a7

Browse files
committed
java 17 cleanup
1 parent 30ae422 commit b70c0a7

4 files changed

Lines changed: 5 additions & 6 deletions

File tree

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,9 @@ protected int getProximityPosition(final int predicateIndex) {
115115
wi().setLastUsedWalker(clone);
116116

117117
// Count 'em all
118-
count++;
119-
while (DTM.NULL != clone.nextNode()) {
118+
do {
120119
count++;
121-
}
120+
} while (DTM.NULL != clone.nextNode());
122121

123122
m_proximityPositions[predicateIndex] = count;
124123
}

src/main/java/org/htmlunit/xpath/compiler/OpMapVector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class OpMapVector {
3030
protected int[] m_map; // IntStack is trying to see this directly
3131

3232
/** Position where size of array is kept */
33-
protected int m_lengthPos;
33+
protected final int m_lengthPos;
3434

3535
/** Size of array */
3636
protected int m_mapSize;

src/main/java/org/htmlunit/xpath/res/XPATHErrorResources.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public Object[][] getContents() {
231231
// the characters specified by the substitution text were encountered instead.
232232
{
233233
ER_EXPECTED_LOC_PATH,
234-
"A location path was expected, but the following token was encountered\u003a {0}"
234+
"A location path was expected, but the following token was encountered: {0}"
235235
},
236236

237237
// Note to translators: A location path is a form of XPath expression.

src/main/java/org/htmlunit/xpath/xml/dtm/ref/DTMNodeProxy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ else if (prefix != null && prefix.equals(specifiedPrefix)) {
913913
final String attrPrefix = attr.getPrefix();
914914
final String value = attr.getNodeValue();
915915
namespace = attr.getNamespaceURI();
916-
if (namespace != null && "http://www.w3.org/2000/xmlns/".equals(namespace)) {
916+
if ("http://www.w3.org/2000/xmlns/".equals(namespace)) {
917917
// at this point we are dealing with DOM Level 2 nodes only
918918
if (specifiedPrefix == null && "xmlns".equals(attr.getNodeName())) {
919919
// default namespace

0 commit comments

Comments
 (0)