diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/unneededThrows/RedundantThrowsDeclarationInspection.java b/java/java-analysis-impl/src/com/intellij/codeInspection/unneededThrows/RedundantThrowsDeclarationInspection.java index 4e450c7c633c..a3b16668ede5 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/unneededThrows/RedundantThrowsDeclarationInspection.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/unneededThrows/RedundantThrowsDeclarationInspection.java @@ -588,8 +588,7 @@ public final class RedundantThrowsDeclarationInspection extends GlobalJavaBatchI if (throwsClass == null) return false; final PsiClassType type = PsiTypesUtil.getClassType(throwsClass); - return redundantThrows.stream() - .anyMatch(e -> e.isAssignableFrom(type)); + return ContainerUtil.exists(redundantThrows, e -> e.isAssignableFrom(type)); } @Override