From 021a206b53b093e45b818c9b76c21ca98bb11bff Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Wed, 27 Apr 2011 15:21:17 +0200 Subject: [PATCH] @Nullable --- .../src/com/intellij/codeInsight/ExceptionUtil.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/java/java-impl/src/com/intellij/codeInsight/ExceptionUtil.java b/java/java-impl/src/com/intellij/codeInsight/ExceptionUtil.java index 2de05fa60127..d6c0d5faac58 100644 --- a/java/java-impl/src/com/intellij/codeInsight/ExceptionUtil.java +++ b/java/java-impl/src/com/intellij/codeInsight/ExceptionUtil.java @@ -191,13 +191,13 @@ public class ExceptionUtil { } @NotNull - public static Collection collectUnhandledExceptions(@NotNull PsiElement element, PsiElement topElement) { + public static Collection collectUnhandledExceptions(@NotNull PsiElement element, @Nullable PsiElement topElement) { final Set set = collectUnhandledExceptions(element, topElement, null); return set == null ? Collections.emptyList() : set; } @Nullable - private static Set collectUnhandledExceptions(@NotNull PsiElement element, PsiElement topElement, Set foundExceptions) { + private static Set collectUnhandledExceptions(@NotNull PsiElement element, PsiElement topElement, @Nullable Set foundExceptions) { Collection unhandledExceptions = null; if (element instanceof PsiCallExpression) { PsiCallExpression expression = (PsiCallExpression)element; @@ -330,7 +330,7 @@ public class ExceptionUtil { } @NotNull - public static List getUnhandledExceptions(final PsiCallExpression methodCall, final PsiElement topElement) { + public static List getUnhandledExceptions(final PsiCallExpression methodCall, @Nullable final PsiElement topElement) { final JavaResolveResult result = methodCall.resolveMethodGenerics(); final PsiMethod method = (PsiMethod)result.getElement(); final PsiSubstitutor substitutor = ApplicationManager.getApplication().runReadAction(new Computable() { @@ -342,7 +342,7 @@ public class ExceptionUtil { } @NotNull - public static List getUnhandledCloserExceptions(final PsiResourceVariable resource, final PsiElement topElement) { + public static List getUnhandledCloserExceptions(final PsiResourceVariable resource, @Nullable final PsiElement topElement) { final PsiType resourceType = resource.getType(); if (resourceType instanceof PsiClassType) { final PsiClass resourceClass = ((PsiClassType)resourceType).resolve(); @@ -359,7 +359,7 @@ public class ExceptionUtil { } @NotNull - public static List getUnhandledExceptions(final PsiThrowStatement throwStatement, final PsiElement topElement) { + public static List getUnhandledExceptions(final PsiThrowStatement throwStatement, @Nullable final PsiElement topElement) { final PsiExpression exception = throwStatement.getException(); final List types = getPreciseThrowTypes(exception); return ContainerUtil.mapNotNull(types, new NullableFunction() {