diff --git a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/ClassCastLambdaUsageTest.java b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/ClassCastLambdaUsageTest.java index bcd12dc60a8..2f2d0649d3c 100644 --- a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/ClassCastLambdaUsageTest.java +++ b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/ClassCastLambdaUsageTest.java @@ -39,12 +39,10 @@ void identification() { "", " // BUG: Diagnostic contains:", " Stream.of(10).map(i -> (Integer) i);", + " }", "", - " class B {", - " void m() {", - " Stream.of(11).map(i -> (T) i);", - " }", - " }", + " private void m2() {", + " Stream.of(11).map(i -> (T) i);", " }", "}") .doTest();