mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-184154 Use Comparator combinator fix produces red code
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
// "Replace with Comparator.comparing" "true"
|
||||
|
||||
import java.util.Comparator;
|
||||
public class MyTest {
|
||||
void setComparator(Comparator<?> comparator) {
|
||||
}
|
||||
|
||||
String getValue() {
|
||||
return "";
|
||||
}
|
||||
|
||||
{
|
||||
setComparator(Comparator.comparing(MyTest::getValue));
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// "Replace with Comparator.comparing" "true"
|
||||
|
||||
import java.util.Comparator;
|
||||
public class MyTest {
|
||||
void setComparator(Comparator<?> comparator) {
|
||||
}
|
||||
|
||||
String getValue(int x) {
|
||||
return "";
|
||||
}
|
||||
|
||||
{
|
||||
setComparator(Comparator.comparing((MyTest o) -> o.getValue(0)));
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// "Replace with Comparator.comparing" "true"
|
||||
|
||||
import java.util.Comparator;
|
||||
public class MyTest {
|
||||
void setComparator(Comparator<?> comparator) {
|
||||
}
|
||||
|
||||
String getValue() {
|
||||
return "";
|
||||
}
|
||||
|
||||
{
|
||||
setComparator((MyTest o1, <caret>MyTest o2) -> o1.getValue().compareTo(o2.getValue()));
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// "Replace with Comparator.comparing" "true"
|
||||
|
||||
import java.util.Comparator;
|
||||
public class MyTest {
|
||||
void setComparator(Comparator<?> comparator) {
|
||||
}
|
||||
|
||||
String getValue(int x) {
|
||||
return "";
|
||||
}
|
||||
|
||||
{
|
||||
setComparator((MyTest o1, <caret>MyTest o2) -> o1.getValue(0).compareTo(o2.getValue(0)));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user