java-decompiler: post-import cleanup (test sources reformatted)

This commit is contained in:
Roman Shevchenko 2014-09-01 19:48:39 +04:00
parent e629738a46
commit c0c83126a6
8 changed files with 174 additions and 182 deletions

View File

@ -26,10 +26,10 @@ public class TestClassLambda {
public void testLambda1() { public void testLambda1() {
int var1 = (int)Math.random(); int var1 = (int)Math.random();
Runnable var2 = () -> { Runnable var2 = () -> {
System.out.println("hello" + var1); System.out.println("hello1" + var1);
}; };
Runnable var3 = () -> { Runnable var3 = () -> {
System.out.println("hello1" + var1); System.out.println("hello2" + var1);
}; };
} }

View File

@ -15,10 +15,7 @@
*/ */
package pkg; package pkg;
import java.util.ArrayList; import java.util.*;
import java.util.Arrays;
import java.util.List;
import java.util.OptionalInt;
import java.util.function.IntBinaryOperator; import java.util.function.IntBinaryOperator;
import java.util.function.Supplier; import java.util.function.Supplier;
@ -27,20 +24,19 @@ public class TestClassLambda {
public int field = 0; public int field = 0;
public void testLambda() { public void testLambda() {
List<Integer> list = Arrays.asList(1, 2, 3, 4, 5, 6, 7); List<Integer> list = Arrays.asList(1, 2, 3, 4, 5, 6, 7);
int b = (int)Math.random(); int b = (int)Math.random();
list.forEach(n -> {int a = 2 * n; System.out.println(a + b + field);}); list.forEach(n -> {
int a = 2 * n;
System.out.println(a + b + field);
});
} }
public void testLambda1() { public void testLambda1() {
int a = (int)Math.random(); int a = (int)Math.random();
Runnable r = () -> { System.out.println("hello" + a); };
Runnable r1 = () -> { System.out.println("hello1" + a); }; Runnable r1 = () -> { System.out.println("hello1" + a); };
Runnable r2 = () -> { System.out.println("hello2" + a); };
} }
public void testLambda2() { public void testLambda2() {
@ -78,5 +74,4 @@ public class TestClassLambda {
public static int localMax(int first, int second) { public static int localMax(int first, int second) {
return 0; return 0;
} }
} }

View File

@ -22,7 +22,6 @@ public class TestClassLoop {
while (true) { while (true) {
System.out.println(); System.out.println();
} }
} }
public static void testFinally() { public static void testFinally() {
@ -34,11 +33,11 @@ public class TestClassLoop {
if (!a) { if (!a) {
return; return;
} }
} finally { }
finally {
System.out.println("1"); System.out.println("1");
} }
} }
} }
public static void testFinallyContinue() { public static void testFinallyContinue() {
@ -48,7 +47,8 @@ public class TestClassLoop {
for (; ; ) { for (; ; ) {
try { try {
System.out.println("1"); System.out.println("1");
} finally { }
finally {
if (a) { if (a) {
System.out.println("3"); System.out.println("3");
continue; continue;
@ -57,7 +57,5 @@ public class TestClassLoop {
System.out.println("4"); System.out.println("4");
} }
} }
} }

View File

@ -27,5 +27,4 @@ public class TestClassSwitch {
System.out.println(5); System.out.println(5);
} }
} }
} }

View File

@ -27,7 +27,8 @@ public class TestClassTypes {
if (time % 2 > 0) { if (time % 2 > 0) {
var7 = 1; var7 = 1;
} else if(time % 3 > 0) { }
else if (time % 3 > 0) {
var7 = 2; var7 = 2;
} }
@ -65,5 +66,4 @@ public class TestClassTypes {
System.out.println(a.size()); System.out.println(a.size());
} }
} }

View File

@ -27,12 +27,12 @@ public class TestClassVar {
try { try {
System.out.println(); System.out.println();
} finally { }
finally {
if (field_boolean) { if (field_boolean) {
System.out.println(); System.out.println();
} }
} }
} }
} }
@ -48,12 +48,12 @@ public class TestClassVar {
int b = a; int b = a;
for(; a < 10 && a == 0; a++) {} for (; a < 10 && a == 0; a++) {
}
if (b != a) { if (b != a) {
System.out.println(); System.out.println();
} }
} }
} }
} }