mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-09 08:09:39 +07:00
IDEA-199811 RefactoringUtil#ensureCodeBlock: support while conditions; support && chains in if-then and while
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// "Replace Stream API chain with loop" "true"
|
||||
// "Fix all 'Stream API call chain can be replaced with loop' problems in file" "true"
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -8,6 +8,15 @@ public class Main {
|
||||
if(list.stream().filter(x -> x != null).an<caret>yMatch(x -> x.startsWith("x"))) {
|
||||
System.out.println("Ok!");
|
||||
}
|
||||
if(list.size() > 2 && list.stream().filter(x -> x != null).anyMatch(x -> x.startsWith("x"))) {
|
||||
System.out.println("Ok!");
|
||||
}
|
||||
if(list.size() > 2 && list.stream().filter(x -> x != null).anyMatch(x -> x.startsWith("x")) && list.size() < 10) {
|
||||
System.out.println("Ok!");
|
||||
}
|
||||
if(list.size() > 2 || list.stream().filter(x -> x != null).anyMatch(x -> x.startsWith("x"))) { // not supported
|
||||
System.out.println("Ok!");
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
Reference in New Issue
Block a user