mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-07 15:35:40 +07:00
GitOrigin-RevId: 22a46c15d8900d8a31514846755a013f6a67ad42
15 lines
408 B
Java
15 lines
408 B
Java
// "Replace method call on lambda with lambda body" "true-preview"
|
|
|
|
import java.util.*;
|
|
import java.util.function.*;
|
|
|
|
public class Test {
|
|
public static void main(String[] args) {
|
|
List<String> list = new ArrayList<>();
|
|
if(list.isEmpty())
|
|
((Consumer<String>) x -> {
|
|
System.out.println(x);
|
|
list.add(x);
|
|
}).<caret>accept("foo");
|
|
}
|
|
} |