Skip to content

Commit 984534e

Browse files
committed
Change severity of IsInstanceLambdaUsage rule to error
1 parent cb32b78 commit 984534e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

gradle/plugins/common/src/main/kotlin/junitbuild.java-errorprone-conventions.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ tasks.withType<JavaCompile>().configureEach {
5353
)
5454
error(
5555
"CanonicalAnnotationSyntax",
56+
"IsInstanceLambdaUsage",
5657
"PackageLocation",
5758
"RedundantStringConversion",
5859
"RedundantStringEscape",

junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/JupiterTestDescriptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public final ExecutionMode getExecutionMode() {
141141

142142
private Optional<ExecutionMode> determineExecutionModeFromAncestors() {
143143
return ancestors() //
144-
.takeWhile(it -> it instanceof JupiterTestDescriptor) //
144+
.takeWhile(JupiterTestDescriptor.class::isInstance) //
145145
.flatMap(ancestor -> determineExecutionModeFromAncestor((JupiterTestDescriptor) ancestor).stream()) //
146146
.findFirst();
147147
}

0 commit comments

Comments
 (0)