diff --git a/java/java-impl/src/com/intellij/codeInspection/lambda/RedundantLambdaParameterTypeInspection.java b/java/java-impl/src/com/intellij/codeInspection/lambda/RedundantLambdaParameterTypeInspection.java index 4e2445fbaee9..b925e8ff8083 100644 --- a/java/java-impl/src/com/intellij/codeInspection/lambda/RedundantLambdaParameterTypeInspection.java +++ b/java/java-impl/src/com/intellij/codeInspection/lambda/RedundantLambdaParameterTypeInspection.java @@ -43,7 +43,7 @@ public class RedundantLambdaParameterTypeInspection extends BaseJavaBatchLocalIn public void visitParameterList(PsiParameterList parameterList) { super.visitParameterList(parameterList); if (isApplicable(parameterList)) { - holder.registerProblem(parameterList, "Remove redundant types", new LambdaParametersFix()); + holder.registerProblem(parameterList, "Lambda parameter type is redundant", new LambdaParametersFix()); } } }; @@ -140,7 +140,7 @@ public class RedundantLambdaParameterTypeInspection extends BaseJavaBatchLocalIn @NotNull @Override public String getFamilyName() { - return "Remove redundant types"; + return "Remove redundant parameter types"; } @Override diff --git a/java/java-tests/testSrc/com/intellij/codeInspection/RedundantLambdaParameterTypeInspectionTest.java b/java/java-tests/testSrc/com/intellij/codeInspection/RedundantLambdaParameterTypeInspectionTest.java index e33d207073f7..03866b770cef 100644 --- a/java/java-tests/testSrc/com/intellij/codeInspection/RedundantLambdaParameterTypeInspectionTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInspection/RedundantLambdaParameterTypeInspectionTest.java @@ -28,7 +28,7 @@ import java.util.List; public class RedundantLambdaParameterTypeInspectionTest extends LightCodeInsightFixtureTestCase { private RedundantLambdaParameterTypeInspection myInspection = new RedundantLambdaParameterTypeInspection(); - private String myIntentionName = "Remove redundant types"; + private String myIntentionName = "Remove redundant parameter types"; @Override protected String getBasePath() { diff --git a/resources-en/src/inspectionDescriptions/RedundantLambdaParameterType.html b/resources-en/src/inspectionDescriptions/RedundantLambdaParameterType.html index ea49461e2613..773be04221a8 100644 --- a/resources-en/src/inspectionDescriptions/RedundantLambdaParameterType.html +++ b/resources-en/src/inspectionDescriptions/RedundantLambdaParameterType.html @@ -1,5 +1,11 @@
-This inspection removes lambda formal parameter types when they can be inferred from context. +This inspection reports lambda formal parameter types which are redundant, because they can be inferred from the context. +The quick fix removes the parameter types from the lambda. +
Example:
Map<String, Integer> map = ...
+map.forEach((String s, Integer i) -> log.info(s + "=" + i));
+The code above can be simplified to the following: +
Map<String, Integer> map = ...
+map.forEach((s, i) -> log.info(s + "=" + i));
\ No newline at end of file