mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
split compound filter into filters chain (IDEA-146147)
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
// "Split into filter's chain" "true"
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Split into filter's chain" "false"
|
||||
|
||||
import java.util.stream.Stream;
|
||||
class Test {
|
||||
void foo(Stream<String> stringStream ) {
|
||||
stringStream.filter(name -> name.startsWith("A") &<caret>&).findAny();
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Split into filter's chain" "false"
|
||||
|
||||
import java.util.stream.Stream;
|
||||
class Test {
|
||||
void foo(Stream<String> stringStream ) {
|
||||
stringStream.filter(name -> name.startsWith("A") |<caret>| name.length() > 1).findAny();
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Split into filter's chain" "true"
|
||||
|
||||
import java.util.stream.Stream;
|
||||
class Test {
|
||||
void foo(Stream<String> stringStream ) {
|
||||
stringStream.filter(name -> name.startsWith("A") //starts with A
|
||||
&<caret>& /*comment*/name.length() > 1).findAny();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user