[java-inspections] IDEA-283015: fix at isSafeLambdaReplacement level (IJ-CR-17732)

GitOrigin-RevId: 07a8235e72509e11a48a2304fbfc82aa637c8cf6
This commit is contained in:
Tagir Valeev
2021-12-01 10:38:43 +07:00
committed by intellij-monorepo-bot
parent 1806d3fb65
commit 064235a0b3
7 changed files with 46 additions and 8 deletions

View File

@@ -0,0 +1,8 @@
// "Replace lambda expression with 'Function.identity()'" "true"
import java.util.function.Function;
class Scratch {
public static void main(String[] args) {
Function<String, String> myFunc = Function.identity();
}
}

View File

@@ -0,0 +1,8 @@
// "Replace lambda expression with 'Function.identity()'" "true"
import java.util.function.Function;
class Scratch {
public static void main(String[] args) {
Function<? super CharSequence, ? extends CharSequence> myFunc = Function.identity();
}
}

View File

@@ -0,0 +1,8 @@
// "Replace lambda expression with 'Function.identity()'" "true"
import java.util.function.Function;
class Scratch {
public static void main(String[] args) {
Function<String, String> myFunc = c <caret>-> c;
}
}

View File

@@ -0,0 +1,8 @@
// "Replace lambda expression with 'Function.identity()'" "true"
import java.util.function.Function;
class Scratch {
public static void main(String[] args) {
Function<? super CharSequence, ? extends CharSequence> myFunc = c <caret>-> c;
}
}