diff --git a/java/java-impl/src/com/intellij/codeInspection/javaDoc/JavaDocLocalInspection.java b/java/java-impl/src/com/intellij/codeInspection/javaDoc/JavaDocLocalInspection.java index 1fdd14ddca2d..8b098f28dae3 100644 --- a/java/java-impl/src/com/intellij/codeInspection/javaDoc/JavaDocLocalInspection.java +++ b/java/java-impl/src/com/intellij/codeInspection/javaDoc/JavaDocLocalInspection.java @@ -798,16 +798,16 @@ public class JavaDocLocalInspection extends LocalInspectionTool { } private static class RemoveTagWithoutDescriptionFix implements LocalQuickFix { - private final String myTag; + private final String myTagName; - RemoveTagWithoutDescriptionFix(String tag) { - myTag = tag; + RemoveTagWithoutDescriptionFix(String tagName) { + myTagName = tagName; } @NotNull @Override public String getName() { - return CommonQuickFixBundle.message("fix.remove", myTag); + return CommonQuickFixBundle.message("fix.remove", myTagName); } @NotNull @@ -818,9 +818,9 @@ public class JavaDocLocalInspection extends LocalInspectionTool { @Override public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) { - PsiDocTag myTag = PsiTreeUtil.getParentOfType(descriptor.getPsiElement(), PsiDocTag.class); - if (myTag != null) { - myTag.delete(); + PsiDocTag tag = PsiTreeUtil.getParentOfType(descriptor.getPsiElement(), PsiDocTag.class); + if (tag != null) { + tag.delete(); } } } diff --git a/java/java-impl/src/com/intellij/codeInspection/javaDoc/JavadocHighlightUtil.java b/java/java-impl/src/com/intellij/codeInspection/javaDoc/JavadocHighlightUtil.java index 76dcc1125c47..95b06909fc98 100644 --- a/java/java-impl/src/com/intellij/codeInspection/javaDoc/JavadocHighlightUtil.java +++ b/java/java-impl/src/com/intellij/codeInspection/javaDoc/JavadocHighlightUtil.java @@ -454,9 +454,7 @@ public final class JavadocHighlightUtil { else if ("throws".equals(tag.getName()) || "exception".equals(tag.getName())) { if (emptyThrowsTag(tag)) { String tagText = "" + tag.getName() + ""; - PsiDocTagValue valueElement = tag.getValueElement(); - String tagTextForFix = "@" + tag.getName() + (valueElement != null ? " " + valueElement.getText() : ""); - LocalQuickFix fix = holder.removeTagWithoutDescriptionFix(tagTextForFix); + LocalQuickFix fix = holder.removeTagWithoutDescriptionFix(tag.getName()); holder.problem(tag.getNameElement(), JavaBundle.message("inspection.javadoc.method.problem.missing.tag.description", tagText), fix); } } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterException.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterException.java index 582c5419d054..8cfe033eb1c5 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterException.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterException.java @@ -1,4 +1,4 @@ -// "Remove '@exception IllegalArgumentException'" "true" +// "Remove 'exception'" "true" class Foo { /** diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterExceptionWithoutParams.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterExceptionWithoutParams.java index c13492ebefd6..8cfe033eb1c5 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterExceptionWithoutParams.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterExceptionWithoutParams.java @@ -1,4 +1,4 @@ -// "Remove '@exception'" "true" +// "Remove 'exception'" "true" class Foo { /** diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterThrows.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterThrows.java index 11380cb13b8f..9fd043e82b37 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterThrows.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterThrows.java @@ -1,4 +1,4 @@ -// "Remove '@throws IllegalArgumentException'" "true" +// "Remove 'throws'" "true" class Foo { /** diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterThrowsWithoutParams.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterThrowsWithoutParams.java index 61c62e4a31dc..9fd043e82b37 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterThrowsWithoutParams.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/afterThrowsWithoutParams.java @@ -1,4 +1,4 @@ -// "Remove '@throws'" "true" +// "Remove 'throws'" "true" class Foo { /** diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeException.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeException.java index c19305562211..3621f158c814 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeException.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeException.java @@ -1,4 +1,4 @@ -// "Remove '@exception IllegalArgumentException'" "true" +// "Remove 'exception'" "true" class Foo { /** diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeExceptionWithoutParams.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeExceptionWithoutParams.java index 7c3a593769ec..1890f9de64e2 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeExceptionWithoutParams.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeExceptionWithoutParams.java @@ -1,4 +1,4 @@ -// "Remove '@exception'" "true" +// "Remove 'exception'" "true" class Foo { /** diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeThrows.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeThrows.java index 6a538e78fbaf..1237e9d76a88 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeThrows.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeThrows.java @@ -1,4 +1,4 @@ -// "Remove '@throws IllegalArgumentException'" "true" +// "Remove 'throws'" "true" class Foo { /** diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeThrowsWithoutParams.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeThrowsWithoutParams.java index 86ece5c171ed..02de90515572 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeThrowsWithoutParams.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeJavadocTagWithoutDescription/beforeThrowsWithoutParams.java @@ -1,4 +1,4 @@ -// "Remove '@throws'" "true" +// "Remove 'throws'" "true" class Foo { /**