trivial functional expressions usage: replace anonymous

This commit is contained in:
Anna Kozlova
2016-01-12 16:23:25 +01:00
parent fa1bfba308
commit e39f57a94e
5 changed files with 96 additions and 18 deletions
@@ -0,0 +1,7 @@
// "Replace call with method body" "true"
class Test {
{
System.out.println();
}
}
@@ -0,0 +1,11 @@
// "Replace call with method body" "true"
class Test {
{
new Runnable() {
public void run() {
System.out.println();
}
}.ru<caret>n();
}
}
@@ -0,0 +1,18 @@
// "Replace call with method body" "false"
class Test {
{
new Runnable() {
public void run() {
if (true) {
System.out.println();
return;
}
else {
System.out.println();
return;
}
}
}.ru<caret>n();
}
}