mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 00:20:55 +07:00
[java-inspections] LambdaCanBeMethodReference: disable conversion in many cases when cast is required
Fixes IDEA-267865 Add a option for Java's method reference inspection that ignore lambda which can't convert into method reference without a cast GitOrigin-RevId: b6f762383d6ba1ef19a5de36e0ad53d107ba4e80
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9f3d7463a1
commit
bcb843dd8f
@@ -1,6 +1,5 @@
|
||||
// "Replace with forEach" "true"
|
||||
|
||||
import java.util.function.UnaryOperator;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class Main {
|
||||
@@ -12,6 +11,6 @@ public class Main {
|
||||
static boolean isGood(A a) {}
|
||||
|
||||
public long test() {
|
||||
Stream.iterate(new A(), (UnaryOperator<A>) Main::isGood, a -> a.next()).filter(a -> a.x < 3).forEach(System.out::println);
|
||||
Stream.iterate(new A(), a -> isGood(a), a -> a.next()).filter(a -> a.x < 3).forEach(System.out::println);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user