mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 06:11:42 +07:00
fix split-filter intention on anyMatch()
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
// "Split into filter chain" "true"
|
||||
|
||||
import java.util.List;
|
||||
|
||||
class Test {
|
||||
void f(List<String> l) {
|
||||
l.stream().filter(s -> s/*4*/ !=/*5*/ null/*6*/).anyMatch(/*1*/s/*2*/ ->/*3*//*7*/!s./*8*/isEmpty()/*9*//*10*/);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -4,6 +4,6 @@ import java.util.stream.Stream;
|
||||
class Test {
|
||||
void foo(Stream<String> stringStream ) {
|
||||
stringStream.filter(name -> name.startsWith("A")//starts with A
|
||||
).filter(name -> name.length() > 1/*comment*/).findAny();
|
||||
).filter(name -> /*comment*/name.length() > 1).findAny();
|
||||
}
|
||||
}
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Split into filter chain" "true"
|
||||
|
||||
import java.util.List;
|
||||
|
||||
class Test {
|
||||
void f(List<String> l) {
|
||||
l.stream().anyMatch(/*1*/s/*2*/ ->/*3*/s/*4*/ !=/*5*/ null/*6*/ <caret>&&/*7*/!s./*8*/isEmpty()/*9*//*10*/);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user