LambdaCanBeMethodCallInspection: support Pattern.negate() case

IDEA-197892 Explicitly negated Predicate::test can be simplified with Predicate::negate
This commit is contained in:
Tagir Valeev
2018-09-19 16:00:07 +07:00
parent 2e7763c2ea
commit 596a850fa3
7 changed files with 84 additions and 6 deletions

View File

@@ -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());
}
}