mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-24 09:20:53 +07:00
LambdaCanBeMethodCallInspection: support Pattern.negate() case
IDEA-197892 Explicitly negated Predicate::test can be simplified with Predicate::negate
This commit is contained in:
@@ -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