Skip to content

Commit 475f16a

Browse files
committed
checkstyle
1 parent d4e731f commit 475f16a

File tree

8 files changed

+18
-13
lines changed

8 files changed

+18
-13
lines changed

checkstyle.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@
106106
<property name="message" value="System.out.print/ln found"/>
107107
</module>
108108

109+
<module name="BeforeExecutionExclusionFileFilter">
110+
<property name="fileNamePattern" value="(.*[\\/]test[\\/].*$)|(module\-info\.java$)"/>
111+
</module>
112+
109113
<module name="TreeWalker">
110114

111115
<property name="tabWidth" value="4"/>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<jfreechart.version>1.5.6</jfreechart.version>
7070

7171
<!-- quality -->
72-
<checkstyle.version>13.0.0</checkstyle.version>
72+
<checkstyle.version>12.3.1</checkstyle.version>
7373
<spotbugs.version>4.9.8</spotbugs.version>
7474
<pmd.version>7.20.0</pmd.version>
7575
<archunit.version>1.4.1</archunit.version>

src/main/java/org/htmlunit/html/impl/SimpleRange.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,6 @@ public boolean equals(final Object obj) {
462462
.append(endOffset_, other.endOffset_).isEquals();
463463
}
464464

465-
466465
/**
467466
* {@inheritDoc}
468467
*/

src/main/java/org/htmlunit/javascript/HtmlUnitContextFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ protected boolean hasFeature(final Context cx, final int featureIndex) {
342342
case Context.FEATURE_E4X, Context.FEATURE_NON_ECMA_GET_YEAR -> false;
343343
case Context.FEATURE_HTMLUNIT_MEMBERBOX_NAME -> browserVersion_.hasFeature(JS_PROPERTY_DESCRIPTOR_NAME);
344344
case Context.FEATURE_HTMLUNIT_ARRAY_SORT_COMPERATOR_ACCEPTS_BOOL ->
345-
browserVersion_.hasFeature(JS_ARRAY_SORT_ACCEPTS_INCONSISTENT_COMPERATOR);
345+
browserVersion_.hasFeature(JS_ARRAY_SORT_ACCEPTS_INCONSISTENT_COMPERATOR);
346346
default -> super.hasFeature(cx, featureIndex);
347347
};
348348
}

src/main/java/org/htmlunit/javascript/host/dom/Node.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ public boolean contains(final Object element) {
881881
throw JavaScriptEngine.reportRuntimeError("Could not convert JavaScript argument arg 0");
882882
}
883883

884-
for (; parent != null; parent = parent.getParentElement()) {
884+
for ( ; parent != null; parent = parent.getParentElement()) {
885885
if (this == parent) {
886886
return true;
887887
}

src/main/java/org/htmlunit/javascript/host/xml/FormData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ protected Object nextValue(final Context cx, final Scriptable scope) {
135135
case KEYS -> nextNameValuePair.getName();
136136
case VALUES -> nextNameValuePair.getValue();
137137
case BOTH ->
138-
cx.newArray(scope, new Object[]{nextNameValuePair.getName(), nextNameValuePair.getValue()});
138+
cx.newArray(scope, new Object[]{nextNameValuePair.getName(), nextNameValuePair.getValue()});
139139
default -> throw new AssertionError();
140140
};
141141
}

src/main/java/org/htmlunit/util/Cookie.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import java.util.Objects;
2020

2121
import org.apache.commons.lang3.builder.EqualsBuilder;
22-
import org.apache.commons.lang3.builder.HashCodeBuilder;
2322
import org.apache.http.cookie.ClientCookie;
2423
import org.apache.http.impl.cookie.BasicClientCookie;
2524

@@ -253,8 +252,8 @@ public boolean equals(final Object o) {
253252
*/
254253
@Override
255254
public int hashCode() {
256-
final String path = getPath() == null ? "/" : getPath();
257-
return Objects.hash(getName(), getDomain(), path);
255+
final String path = getPath() == null ? "/" : getPath();
256+
return Objects.hash(getName(), getDomain(), path);
258257
}
259258

260259
/**

src/main/java/org/htmlunit/util/OrderedFastHashMap.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,13 +1000,16 @@ private void orderedListRemove(final int position) {
10001000
public String toString() {
10011001
final int maxLen = 10;
10021002

1003-
return "mapData=%s, mapFillFactor=%s, mapThreshold=%s, mapSize=%s,%norderedList=%s, orderedListSize=%s".formatted(
1004-
mapData_ != null ? Arrays.asList(mapData_).subList(0, Math.min(mapData_.length, maxLen)) : null,
1005-
FILLFACTOR_, mapThreshold_, mapSize_,
1006-
orderedList_ != null
1003+
return "mapData=%s, mapFillFactor=%s, mapThreshold=%s, mapSize=%s,%norderedList=%s, orderedListSize=%s"
1004+
.formatted(
1005+
mapData_ != null
1006+
? Arrays.asList(mapData_).subList(0, Math.min(mapData_.length, maxLen))
1007+
: null,
1008+
FILLFACTOR_, mapThreshold_, mapSize_,
1009+
orderedList_ != null
10071010
? Arrays.toString(Arrays.copyOf(orderedList_, Math.min(orderedList_.length, maxLen)))
10081011
: null,
1009-
orderedListSize_);
1012+
orderedListSize_);
10101013
}
10111014

10121015
/**

0 commit comments

Comments
 (0)