QueryPendingChecks: Replace with noneMatch
Change-Id: I9adbaadcd0a09d66ae5094feab659791df560a72
diff --git a/java/com/google/gerrit/plugins/checks/api/QueryPendingChecks.java b/java/com/google/gerrit/plugins/checks/api/QueryPendingChecks.java
index e880244..fb7a03a 100644
--- a/java/com/google/gerrit/plugins/checks/api/QueryPendingChecks.java
+++ b/java/com/google/gerrit/plugins/checks/api/QueryPendingChecks.java
@@ -147,7 +147,7 @@
// if the root predicate is an AndPredicate, any of its direct children must be a
// CheckerPredicate, the other child predicates can be anything (including any combination of
// AndPredicate, OrPredicate and NotPredicate).
- if (!predicate.getChildren().stream().anyMatch(CheckerPredicate.class::isInstance)) {
+ if (predicate.getChildren().stream().noneMatch(CheckerPredicate.class::isInstance)) {
throw new BadRequestException(
String.format(
"query must be '%s:<checker-uuid>' or '%s:<checker-uuid> AND <other-operators>'",