inspection toolwindow: do not need amnesty descriptor if containing entity is amnestied (IDEA-157558)

This commit is contained in:
Dmitry Batkovich
2016-06-16 17:29:46 +03:00
parent 655bd98920
commit 654b555663
@@ -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