Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeFindFirstRunnableTernary.java
Tagir Valeev 7e574d661c IDEA-163764 "Replace Optional.isPresent() checks with functional-style expressions" create uncompilable code
IDEA-163463 Stream API migration: type argument before map appears sometimes when it's unnecessary
2016-11-11 11:28:44 +07:00

15 lines
323 B
Java

// "Replace with findFirst()" "true"
import java.util.*;
public class Main {
public Runnable getRunnable(List<String> data) {
Runnable def = () -> {};
for(String s : dat<caret>a) {
if(s.startsWith("xyz")) {
return s.length() > 2 ? s::trim : System.out::println;
}
}
return def;
}
}