mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 04:21:24 +07:00
[java-inspections] IDEA-283015: fix at isSafeLambdaReplacement level (IJ-CR-17732)
GitOrigin-RevId: 07a8235e72509e11a48a2304fbfc82aa637c8cf6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1806d3fb65
commit
064235a0b3
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user