From cc79ec29a2943490fbb766aa238b5e94db657992 Mon Sep 17 00:00:00 2001 From: Bas Leijdekkers Date: Wed, 22 Mar 2017 13:05:19 +0100 Subject: [PATCH] fix test by reporting entire local variable declaration --- .../codeInspection/RedundantSuppressInspectionBase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/RedundantSuppressInspectionBase.java b/java/java-analysis-impl/src/com/intellij/codeInspection/RedundantSuppressInspectionBase.java index fbe8fca94f78..51747e9d7bb4 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/RedundantSuppressInspectionBase.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/RedundantSuppressInspectionBase.java @@ -269,8 +269,8 @@ public class RedundantSuppressInspectionBase extends GlobalInspectionTool { myQuickFixes.put(key, fix); } PsiElement identifier; - if ((suppressedScope instanceof PsiNameIdentifierOwner)) { - identifier = ((PsiNameIdentifierOwner)documentedElement).getNameIdentifier(); + if (suppressedScope instanceof PsiNameIdentifierOwner && suppressedScope instanceof PsiJavaDocumentedElement) { + identifier = ((PsiNameIdentifierOwner)suppressedScope).getNameIdentifier(); } else { identifier = suppressedScope;