mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java] cleanup: use reversed iteration
GitOrigin-RevId: d06c8b96458e1f73308825669af589888ed67aef
This commit is contained in:
committed by
intellij-monorepo-bot
parent
53489602f1
commit
865726ee14
+2
-4
@@ -15,6 +15,7 @@ import com.intellij.refactoring.util.RefactoringChangeUtil;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.ArrayUtilRt;
|
||||
import com.intellij.util.JavaPsiConstructorUtil;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -238,10 +239,7 @@ final class StatementChecker {
|
||||
}
|
||||
|
||||
private static boolean checkMultipleTypes(@NotNull PsiClass catchClass, @NotNull List<? extends PsiType> upperCatchTypes) {
|
||||
for (int i = upperCatchTypes.size() - 1; i >= 0; i--) {
|
||||
if (checkSingleType(catchClass, upperCatchTypes.get(i))) return true;
|
||||
}
|
||||
return false;
|
||||
return ContainerUtil.exists(upperCatchTypes.reversed(), type -> checkSingleType(catchClass, type));
|
||||
}
|
||||
|
||||
private static boolean checkSingleType(@NotNull PsiClass catchClass, @Nullable PsiType upperCatchType) {
|
||||
|
||||
Reference in New Issue
Block a user