From 88e5f6d6d07052e5f9e9d7be731ba4d0e3a7b1b9 Mon Sep 17 00:00:00 2001 From: anna Date: Fri, 25 Mar 2011 12:35:57 +0100 Subject: [PATCH] assertions (EA-26317 - IAE: GlobalJavaInspectionContextImpl.a) --- .../codeInspection/ex/GlobalJavaInspectionContextImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/java/java-impl/src/com/intellij/codeInspection/ex/GlobalJavaInspectionContextImpl.java b/java/java-impl/src/com/intellij/codeInspection/ex/GlobalJavaInspectionContextImpl.java index 10a0aa98a4ff..860af752e6c3 100644 --- a/java/java-impl/src/com/intellij/codeInspection/ex/GlobalJavaInspectionContextImpl.java +++ b/java/java-impl/src/com/intellij/codeInspection/ex/GlobalJavaInspectionContextImpl.java @@ -218,6 +218,7 @@ public class GlobalJavaInspectionContextImpl extends GlobalJavaInspectionContext )); final List processors = myDerivedClassesRequests.get(sortedID); + LOG.assertTrue(processors != null, psiClass.getClass().getName()); ClassInheritorsSearch.search(psiClass, searchScope, false) .forEach(createMembersProcessor(processors, scope)); } @@ -229,12 +230,14 @@ public class GlobalJavaInspectionContextImpl extends GlobalJavaInspectionContext final List sortedIDs = getSortedIDs(myDerivedMethodsRequests); for (SmartPsiElementPointer sortedID : sortedIDs) { final PsiMethod psiMethod = (PsiMethod)sortedID.getElement(); + if (psiMethod == null) continue; final RefMethod refMethod = (RefMethod)refManager.getReference(psiMethod); context .incrementJobDoneAmount(GlobalInspectionContextImpl.FIND_EXTERNAL_USAGES, refManager.getQualifiedName(refMethod)); final List processors = myDerivedMethodsRequests.get(sortedID); + LOG.assertTrue(processors != null, psiMethod.getClass().getName()); OverridingMethodsSearch.search(psiMethod, searchScope, true) .forEach(createMembersProcessor(processors, scope)); } @@ -249,6 +252,7 @@ public class GlobalJavaInspectionContextImpl extends GlobalJavaInspectionContext if (psiField == null) continue; final List processors = myFieldUsagesRequests.get(sortedID); + LOG.assertTrue(processors != null, psiField.getClass().getName()); context .incrementJobDoneAmount(GlobalInspectionContextImpl.FIND_EXTERNAL_USAGES, refManager.getQualifiedName(refManager.getReference(psiField))); @@ -267,6 +271,7 @@ public class GlobalJavaInspectionContextImpl extends GlobalJavaInspectionContext if (psiClass == null) continue; final List processors = myClassUsagesRequests.get(sortedID); + LOG.assertTrue(processors != null, psiClass.getClass().getName()); context.incrementJobDoneAmount(GlobalInspectionContextImpl.FIND_EXTERNAL_USAGES, ApplicationManager.getApplication().runReadAction( new Computable() { public String compute() { @@ -289,6 +294,7 @@ public class GlobalJavaInspectionContextImpl extends GlobalJavaInspectionContext if (psiMethod == null) continue; final List processors = myMethodUsagesRequests.get(sortedID); + LOG.assertTrue(processors != null, psiMethod.getClass().getName()); context .incrementJobDoneAmount(GlobalInspectionContextImpl.FIND_EXTERNAL_USAGES, refManager.getQualifiedName(refManager.getReference(psiMethod)));