From 654b555663ca1abf67129a0df03e7e614e2a04d5 Mon Sep 17 00:00:00 2001 From: Dmitry Batkovich Date: Thu, 16 Jun 2016 17:29:21 +0300 Subject: [PATCH] inspection toolwindow: do not need amnesty descriptor if containing entity is amnestied (IDEA-157558) --- .../codeInspection/ui/DefaultInspectionToolPresentation.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/DefaultInspectionToolPresentation.java b/platform/lang-impl/src/com/intellij/codeInspection/ui/DefaultInspectionToolPresentation.java index e33d42acf9c0..1c6893490690 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/DefaultInspectionToolPresentation.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/DefaultInspectionToolPresentation.java @@ -363,7 +363,9 @@ public class DefaultInspectionToolPresentation implements ProblemDescriptionsPro @Override public void amnesty(RefEntity refEntity, CommonProblemDescriptor descriptor) { final CommonProblemDescriptor[] ignoredDescriptors = getIgnoredElements().get(refEntity); - getIgnoredElements().put(refEntity, ArrayUtil.remove(ignoredDescriptors, descriptor)); + if (ignoredDescriptors != null) { + getIgnoredElements().put(refEntity, ArrayUtil.remove(ignoredDescriptors, descriptor)); + } } @Override