diff options
Diffstat (limited to 'java/java-analysis-impl/src/com/intellij/codeInspection/unneededThrows/RedundantThrows.java')
-rw-r--r-- | java/java-analysis-impl/src/com/intellij/codeInspection/unneededThrows/RedundantThrows.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/unneededThrows/RedundantThrows.java b/java/java-analysis-impl/src/com/intellij/codeInspection/unneededThrows/RedundantThrows.java index 6c611f707d6c..ff1f366c42e5 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/unneededThrows/RedundantThrows.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/unneededThrows/RedundantThrows.java @@ -294,7 +294,10 @@ public class RedundantThrows extends GlobalJavaBatchInspectionTool { if (refMethod != null) { for (RefMethod refDerived : refMethod.getDerivedMethods()) { - removeException(refDerived, exceptionType, refsToDelete, (PsiMethod)refDerived.getElement()); + PsiModifierListOwner method = refDerived.getElement(); + if (method != null) { + removeException(refDerived, exceptionType, refsToDelete, (PsiMethod)method); + } } } else { final Query<Pair<PsiMethod,PsiMethod>> query = AllOverridingMethodsSearch.search(psiMethod.getContainingClass()); |