mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
introduce functional: convert to lambda when applicable (IDEA-174018)
This commit is contained in:
+2
-6
@@ -4,12 +4,8 @@ class Test {
|
||||
String myName;
|
||||
void foo() {
|
||||
if (true) {
|
||||
Consumer<String> consumer = new Consumer<String>() {
|
||||
public void accept(String myName) {
|
||||
System.out.println("Hello, world " + myName);
|
||||
}
|
||||
};
|
||||
consumer.accept(myName);
|
||||
Consumer<String> stringConsumer = myName -> System.out.println("Hello, world " + myName);
|
||||
stringConsumer.accept(myName);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user