mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
convert anonym class to onle-line lambda if possible (IDEA-90820)
This commit is contained in:
+1
-3
@@ -1,8 +1,6 @@
|
||||
// "Replace with lambda" "true"
|
||||
class Test {
|
||||
{
|
||||
Comparable<String> c = o -> {
|
||||
return 0;
|
||||
};
|
||||
Comparable<String> c = o -> 0;
|
||||
}
|
||||
}
|
||||
+1
-3
@@ -9,8 +9,6 @@ class Test2 {
|
||||
static <T> I<T> bar(I<T> i){return i;}
|
||||
|
||||
{
|
||||
bar((List<String> list) -> {
|
||||
return null; //To change body of implemented methods use File | Settings | File Templates.
|
||||
});
|
||||
bar((List<String> list) -> null);
|
||||
}
|
||||
}
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Replace with lambda" "true"
|
||||
class Test {
|
||||
{
|
||||
Comparable<String> c = o -> {
|
||||
System.out.println();
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Replace with lambda" "true"
|
||||
class Test {
|
||||
{
|
||||
Comparable<String> c = new Compa<caret>rable<String>() {
|
||||
@Override
|
||||
public int compareTo(String o) {
|
||||
System.out.println();
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user