diff --git a/java/java-impl/src/com/intellij/codeInspection/numeric/ConvertNumericLiteralQuickFix.java b/java/java-impl/src/com/intellij/codeInspection/numeric/ConvertNumericLiteralQuickFix.java index b9fabc19557b..cf204d4a78f8 100644 --- a/java/java-impl/src/com/intellij/codeInspection/numeric/ConvertNumericLiteralQuickFix.java +++ b/java/java-impl/src/com/intellij/codeInspection/numeric/ConvertNumericLiteralQuickFix.java @@ -21,8 +21,6 @@ import org.jetbrains.annotations.NotNull; */ final class ConvertNumericLiteralQuickFix implements LocalQuickFix { - private static final Logger LOGGER = Logger.getInstance(ConvertNumericLiteralQuickFix.class); - @NotNull private final String myConvertedValue; @NotNull @Nls(capitalization = Nls.Capitalization.Sentence) private final String myName; @NotNull private @NlsContexts.ListItem final String myFamilyName; @@ -49,10 +47,7 @@ final class ConvertNumericLiteralQuickFix implements LocalQuickFix { public void applyFix(@NotNull final Project project, @NotNull final ProblemDescriptor descriptor) { final PsiElement element = descriptor.getPsiElement(); - if (element == null) { - LOGGER.error("Problem descriptor cannot be without PsiElement"); - return; - } + if (element == null) return; final PsiExpression replacement = JavaPsiFacade.getElementFactory(project).createExpressionFromText(myConvertedValue, null); element.replace(replacement); diff --git a/java/java-impl/src/inspectionDescriptions/InsertLiteralUnderscores.html b/java/java-impl/src/inspectionDescriptions/InsertLiteralUnderscores.html index 86989db4819c..42afa71f9216 100644 --- a/java/java-impl/src/inspectionDescriptions/InsertLiteralUnderscores.html +++ b/java/java-impl/src/inspectionDescriptions/InsertLiteralUnderscores.html @@ -1,9 +1,9 @@
-Reports numeric literals without underscores which may be hard to read due to their length +Reports numeric literals without underscores that may be hard to read due to their lengthThis inspection only reports if the language level of the project or module is 7 or higher
Quick fix: adds underscores into numeric literals. E.g. 1000000 will be converted to 1_000_000.
-New in 2020.2 +
New in 2020.2
diff --git a/java/java-impl/src/inspectionDescriptions/RemoveLiteralUnderscores.html b/java/java-impl/src/inspectionDescriptions/RemoveLiteralUnderscores.html index a76ce136e5b6..7abeb192dbe7 100644 --- a/java/java-impl/src/inspectionDescriptions/RemoveLiteralUnderscores.html +++ b/java/java-impl/src/inspectionDescriptions/RemoveLiteralUnderscores.html @@ -1,9 +1,9 @@ -Reports numeric literals with underscores, so they could be removed using a quick-fix +Reports numeric literals with underscores so they can be removed using a quick-fixThis inspection only reports if the language level of the project or module is 7 or higher
Quick fix: removes underscores from numeric literals. E.g. 1_000_000 will be converted to 1000000.
-New in 2020.2 +
New in 2020.2
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/underscoresInLiterals/afterInsertUnderscores.java b/java/java-tests/testData/codeInsight/underscoresInLiterals/afterInsertUnderscores.java index f933f0ba3b09..e66a04121b8e 100644 --- a/java/java-tests/testData/codeInsight/underscoresInLiterals/afterInsertUnderscores.java +++ b/java/java-tests/testData/codeInsight/underscoresInLiterals/afterInsertUnderscores.java @@ -1,4 +1,4 @@ -// "Fix all 'No underscores in numeric literal' problems in file" "true" +// "Fix all 'Unreadable numeric literal' problems in file" "true" class C { int c = 299_792_000; diff --git a/java/java-tests/testData/codeInsight/underscoresInLiterals/beforeInsertUnderscores.java b/java/java-tests/testData/codeInsight/underscoresInLiterals/beforeInsertUnderscores.java index f284f25bc638..66e8e9eee542 100644 --- a/java/java-tests/testData/codeInsight/underscoresInLiterals/beforeInsertUnderscores.java +++ b/java/java-tests/testData/codeInsight/underscoresInLiterals/beforeInsertUnderscores.java @@ -1,4 +1,4 @@ -// "Fix all 'No underscores in numeric literal' problems in file" "true" +// "Fix all 'Unreadable numeric literal' problems in file" "true" class C { int c =