mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-02 11:18:16 +07:00
IDEA-163463 Stream API migration: type argument before map appears sometimes when it's unnecessary
15 lines
323 B
Java
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;
|
|
}
|
|
} |