mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-31 23:21:09 +07:00
10 lines
267 B
Java
10 lines
267 B
Java
// "Simplify optional chain to '...isPresent()'" "true"
|
|
import java.util.Optional;
|
|
|
|
public class Test {
|
|
|
|
public void test() {
|
|
Optional<String[]> s = Optional.of(new String[] {"1","2","3"});
|
|
Stream<String> s1 = s.map(Stream::of).orElse(Stream.empty());
|
|
}
|
|
} |