LambdaCanBeMethodReferenceInspection: fix EA-140341 CCE; cleanup

This commit is contained in:
Tagir Valeev
2019-03-26 10:42:03 +07:00
parent 850c429b46
commit e85e0ebdfb
3 changed files with 20 additions and 11 deletions

View File

@@ -0,0 +1,6 @@
// "Replace lambda with method reference" "true"
class Bar extends Random {
public void test(Object obj) {
Runnable r = ((String) obj)::trim;
}
}

View File

@@ -0,0 +1,6 @@
// "Replace lambda with method reference" "true"
class Bar extends Random {
public void test(Object obj) {
Runnable r = () -> <caret>((String)obj).trim();
}
}