Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/optionalToIf/beforeStream.java
Artemiy Sartakov 6f1efb8fc0 OptionalToIfInspection: added inspection to desugar optional chain to sequence of if statements (IDEA-212269)
GitOrigin-RevId: c83b70e05544529b3dfffe24bc87997910edcb56
2019-08-07 17:02:43 +03:00

12 lines
297 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();
}
}