mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-21 21:50:54 +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
19 lines
527 B
Java
19 lines
527 B
Java
// "Replace lambda with method reference" "false"
|
|
import java.util.function.Function;
|
|
import java.util.function.Supplier;
|
|
class Foo {}
|
|
class Bar {}
|
|
class Something {
|
|
static void stuff(Function<Foo, Bar> foo2bar) {}
|
|
static void stuff(Supplier<Bar> sup4Bar) {}
|
|
}
|
|
class Something2 {
|
|
static Bar bar(Foo foo) { return null; }
|
|
static Bar bar() { return null; }
|
|
}
|
|
class Main {
|
|
public static void main(String[] args) {
|
|
Something.stuff(foo -> <caret>Something2.bar(foo));
|
|
Something.stuff(() -> Something2.bar());
|
|
}
|
|
} |