mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-12 13:07:01 +07:00
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
16 lines
322 B
Java
16 lines
322 B
Java
// "Replace with forEach" "true"
|
|
|
|
import java.util.stream.Stream;
|
|
|
|
public class Main {
|
|
static class A {
|
|
A next(){return null;}
|
|
int x;
|
|
}
|
|
|
|
static boolean isGood(A a) {}
|
|
|
|
public long test() {
|
|
Stream.iterate(new A(), a -> isGood(a), a -> a.next()).filter(a -> a.x < 3).forEach(System.out::println);
|
|
}
|
|
} |