mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 08:45:34 +07:00
introduce functional: convert to lambda when applicable (IDEA-174018)
This commit is contained in:
+2
-6
@@ -2,11 +2,7 @@ import java.util.function.Supplier;
|
||||
|
||||
class Test {
|
||||
void foo() {
|
||||
Supplier<String> supplier = new Supplier<String>() {
|
||||
public String get() {
|
||||
return "Hello, world";
|
||||
}
|
||||
};
|
||||
System.out.println(supplier.get());
|
||||
Supplier<String> stringSupplier = () -> "Hello, world";
|
||||
System.out.println(stringSupplier.get());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user