mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 21:55:01 +07:00
LambdaCanBeMethodCallInspection: support Pattern.negate() case
IDEA-197892 Explicitly negated Predicate::test can be simplified with Predicate::negate
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace lambda expression with 'Pattern.negate()'" "true"
|
||||
import java.util.function.Predicate;
|
||||
|
||||
public class Main {
|
||||
void foo(Predicate<? super String> p) {}
|
||||
|
||||
void bar(Predicate<? super String> p1) {
|
||||
foo(p1.negate());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user