mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 10:20:15 +07:00
rename inspection/fix according to spec (IDEA-108821)
This commit is contained in:
@@ -42,7 +42,7 @@ public class RedundantLambdaCodeBlockInspection extends BaseJavaBatchLocalInspec
|
||||
@NotNull
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return "Lambda code block can be replaced with expression";
|
||||
return "Statement lambda can be replaced with expression lambda";
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -74,7 +74,7 @@ public class RedundantLambdaCodeBlockInspection extends BaseJavaBatchLocalInspec
|
||||
} else {
|
||||
errorElement = body.getFirstChild();
|
||||
}
|
||||
holder.registerProblem(errorElement, "Lambda code block can be replaced with one line expression",
|
||||
holder.registerProblem(errorElement, "Statement lambda can be replaced with expression lambda",
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL, new ReplaceWithExprFix());
|
||||
}
|
||||
}
|
||||
@@ -111,7 +111,7 @@ public class RedundantLambdaCodeBlockInspection extends BaseJavaBatchLocalInspec
|
||||
@NotNull
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Replace with one line expression";
|
||||
return "Replace with expression lambda";
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with one line expression" "true"
|
||||
// "Replace with expression lambda" "true"
|
||||
class Test {
|
||||
{
|
||||
Comparable<String> c = (o) -> 0;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with one line expression" "true"
|
||||
// "Replace with expression lambda" "true"
|
||||
class Test {
|
||||
{
|
||||
Runnable c = () -> System.out.println();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with one line expression" "true"
|
||||
// "Replace with expression lambda" "true"
|
||||
class Test {
|
||||
{
|
||||
Runnable c = () -> System.out.println();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with one line expression" "true"
|
||||
// "Replace with expression lambda" "true"
|
||||
class Test {
|
||||
{
|
||||
Comparable<String> c = (o) -> {r<caret>eturn 0;};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with one line expression" "false"
|
||||
// "Replace with expression lambda" "false"
|
||||
class Test {
|
||||
{
|
||||
Runnable c = () -> <caret>{foo();};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with one line expression" "true"
|
||||
// "Replace with expression lambda" "true"
|
||||
class Test {
|
||||
{
|
||||
Runnable c = () -> <caret>{System.out.println();};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with one line expression" "true"
|
||||
// "Replace with expression lambda" "true"
|
||||
class Test {
|
||||
{
|
||||
Runnable c = () -> <caret>{{System.out.println();}};
|
||||
|
||||
@@ -617,7 +617,7 @@
|
||||
<localInspection language="JAVA" shortName="Convert2MethodRef" displayName="Lambda can be replaced with method reference"
|
||||
groupName="Java language level migration aids" enabledByDefault="true" level="WARNING"
|
||||
implementationClass="com.intellij.codeInspection.LambdaCanBeMethodReferenceInspection" />
|
||||
<localInspection language="JAVA" shortName="CodeBlock2Expr" displayName="Lambda code block can be replaced with expression"
|
||||
<localInspection language="JAVA" shortName="CodeBlock2Expr" displayName="Statement lambda can be replaced with expression lambda"
|
||||
groupName="Java language level migration aids" enabledByDefault="true" level="WARNING"
|
||||
implementationClass="com.intellij.codeInspection.RedundantLambdaCodeBlockInspection" />
|
||||
<localInspection language="JAVA" suppressId="unchecked" shortName="SafeVarargsDetector"
|
||||
|
||||
Reference in New Issue
Block a user