mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
8 lines
220 B
Java
8 lines
220 B
Java
// "Use 'orElse' method without lambda" "true-preview"
|
|
import java.util.*;
|
|
|
|
class Test {
|
|
public String test(List<String> data) {
|
|
return data.stream().filter(Objects::nonNull).findFirst().orElse(null);
|
|
}
|
|
} |