AnonymousCanBeLambdaInspection: support parenthesized anonymous class

This commit is contained in:
Tagir Valeev
2018-07-06 16:30:52 +07:00
parent 7f9840045c
commit c08578a8b8
3 changed files with 17 additions and 1 deletions
@@ -0,0 +1,6 @@
// "Replace with lambda" "true"
class Test {
private void doSomething() {
((Runnable) () -> System.out.println()).run();
}
}
@@ -0,0 +1,10 @@
// "Replace with lambda" "true"
class Test {
private void doSomething() {
(new <caret>Runnable() {
public void run() {
System.out.println();
}
}).run();
}
}