mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-28 04:37:32 +07:00
AnonymousCanBeLambdaInspection: support parenthesized anonymous class
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
// "Replace with lambda" "true"
|
||||
class Test {
|
||||
private void doSomething() {
|
||||
((Runnable) () -> System.out.println()).run();
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace with lambda" "true"
|
||||
class Test {
|
||||
private void doSomething() {
|
||||
(new <caret>Runnable() {
|
||||
public void run() {
|
||||
System.out.println();
|
||||
}
|
||||
}).run();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user