mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
IDEA-162696 Intention "Merge filter chain" does not add parentheses if necessary
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
// "Merge filter's chain" "true"
|
||||
|
||||
import java.util.stream.Stream;
|
||||
class Test {
|
||||
void foo(Stream<String> stringStream ) {
|
||||
stringStream.filter(name -> (name.startsWith("A") || name.startsWith("B")) && (name.length() > 3 || name.length() == 1)).findAny();
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Merge filter's chain" "true"
|
||||
|
||||
import java.util.stream.Stream;
|
||||
class Test {
|
||||
void foo(Stream<String> stringStream ) {
|
||||
stringStream.filt<caret>er(name -> name.startsWith("A") || name.startsWith("B"))
|
||||
.filter(a -> a.length() > 3 || a.length() == 1).findAny();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user