mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
12 lines
301 B
Java
12 lines
301 B
Java
// "Fix all ''Optional' can be replaced with sequence of 'if' statements' problems in file" "true"
|
|
|
|
import java.util.Optional;
|
|
import java.util.stream.Stream;
|
|
|
|
class Test {
|
|
|
|
void stream(String in) {
|
|
Stream<String> out = Optional.<caret>of(in).map(s -> s.length() > 2 ? s : null).stream();
|
|
}
|
|
|
|
} |