Skip to content

Commit aff3d73

Browse files
committed
jdk17
1 parent c51756d commit aff3d73

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

src/test/java/org/htmlunit/HttpWebConnection3Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public void acceptEncoding() throws Exception {
179179
* @return true when the url matches, false otherwise
180180
*/
181181
public static ExpectedCondition<Boolean> currentUrlContains(final String url) {
182-
return new ExpectedCondition<Boolean>() {
182+
return new ExpectedCondition<>() {
183183
@Override
184184
public Boolean apply(final WebDriver driver) {
185185
final String currentUrl = driver.getCurrentUrl();

src/test/java/org/htmlunit/archunit/Architecture2Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ else if (oneTests.size() == 0) {
194194
.should().dependOnClassesThat().resideInAPackage("org.hamcrest..");
195195

196196
private static final ArchCondition<JavaMethod> haveConsistentTestAnnotations =
197-
new ArchCondition<JavaMethod>("have consistent HtmlUnit test annotations") {
197+
new ArchCondition<>("have consistent HtmlUnit test annotations") {
198198
@Override
199199
public void check(final JavaMethod method, final ConditionEvents events) {
200200
try {

src/test/java/org/htmlunit/archunit/ArchitectureTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ public class ArchitectureTest {
232232
.orShould().beDeclaredInClassesThat().areAnnotatedWith(JsxClasses.class);
233233

234234
private static final DescribedPredicate<? super JavaClass> isAssignableToScriptable =
235-
new DescribedPredicate<JavaClass>("@is not assignable to Scriptable") {
235+
new DescribedPredicate<>("@is not assignable to Scriptable") {
236236
@Override
237237
public boolean test(final JavaClass javaClass) {
238238
// we have to build a more complex implemenation because
@@ -399,7 +399,7 @@ public boolean test(final JavaClass javaClass) {
399399
.orShould().haveNameStartingWith("is");
400400

401401
private static final DescribedPredicate<JavaMethod> haveJsxGetterWithNonDefaultPropertyName =
402-
new DescribedPredicate<JavaMethod>("@JsxGetter has a non default propertyName") {
402+
new DescribedPredicate<>("@JsxGetter has a non default propertyName") {
403403
@Override
404404
public boolean test(final JavaMethod method) {
405405
return StringUtils.isNotEmpty(method.getAnnotationOfType(JsxGetter.class).propertyName());
@@ -424,7 +424,7 @@ public boolean test(final JavaMethod method) {
424424
.should().haveNameStartingWith("set");
425425

426426
private static final DescribedPredicate<JavaMethod> haveJsxSetterWithNonDefaultPropertyName =
427-
new DescribedPredicate<JavaMethod>("@JsxSetter has a non default propertyName") {
427+
new DescribedPredicate<>("@JsxSetter has a non default propertyName") {
428428
@Override
429429
public boolean test(final JavaMethod method) {
430430
return StringUtils.isNotEmpty(method.getAnnotationOfType(JsxSetter.class).propertyName());
@@ -441,7 +441,7 @@ public boolean test(final JavaMethod method) {
441441
.should().haveNameEndingWith("_js");
442442

443443
private static final ArchCondition<JavaMethod> hasMatchingGetter =
444-
new ArchCondition<JavaMethod>("every @JsxSetter needs a matching @JsxGetter") {
444+
new ArchCondition<>("every @JsxSetter needs a matching @JsxGetter") {
445445
@Override
446446
public void check(final JavaMethod method, final ConditionEvents events) {
447447
String getterName = "g" + method.getName().substring(1);

src/test/java/org/htmlunit/libraries/dojo/DojoTestBase.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,12 @@ void test(final String module, final long waitTime) throws Exception {
103103
}
104104
}
105105

106-
String expFileName = StringUtils.replace(module, ".", "");
107-
expFileName = StringUtils.replace(expFileName, "_", "");
108-
expFileName = StringUtils.replace(expFileName, "/", "_");
106+
final String expFileName = module
107+
.replace(".", "")
108+
.replace("_", "")
109+
.replace("/", "_");
109110
String expected = loadExpectation(expFileName);
110-
expected = StringUtils.replace(expected, "\r\n", "\n");
111+
expected = expected.replace("\r\n", "\n");
111112

112113
assertEquals(normalize(expected), normalize(result.toString()));
113114
// assertEquals(expected, result.toString());

0 commit comments

Comments
 (0)