mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 15:41:26 +07:00
StreamToLoopInspection: added ExplicitCollectTerminalOperation; StreamVariable simplified; guard checks added (IDEA-CR-15249)
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
// "Replace Stream API chain with loop" "true"
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Main {
|
||||
private static void test(List<String> list) {
|
||||
long count = list.stream().filter(s -> !s.isEmpty()).co<caret>unt();
|
||||
if(count > 10) {
|
||||
long result = count*2;
|
||||
System.out.println(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user