java-decompiler: post-import cleanup (test sources reformatted)
This commit is contained in:
Binary file not shown.
@@ -26,10 +26,10 @@ public class TestClassLambda {
|
||||
public void testLambda1() {
|
||||
int var1 = (int)Math.random();
|
||||
Runnable var2 = () -> {
|
||||
System.out.println("hello" + var1);
|
||||
System.out.println("hello1" + var1);
|
||||
};
|
||||
Runnable var3 = () -> {
|
||||
System.out.println("hello1" + var1);
|
||||
System.out.println("hello2" + var1);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -15,10 +15,7 @@
|
||||
*/
|
||||
package pkg;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.OptionalInt;
|
||||
import java.util.*;
|
||||
import java.util.function.IntBinaryOperator;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@@ -27,20 +24,19 @@ public class TestClassLambda {
|
||||
public int field = 0;
|
||||
|
||||
public void testLambda() {
|
||||
|
||||
List<Integer> list = Arrays.asList(1, 2, 3, 4, 5, 6, 7);
|
||||
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() {
|
||||
|
||||
int a = (int)Math.random();
|
||||
|
||||
Runnable r = () -> { System.out.println("hello" + a); };
|
||||
|
||||
Runnable r1 = () -> { System.out.println("hello1" + a); };
|
||||
Runnable r2 = () -> { System.out.println("hello2" + a); };
|
||||
}
|
||||
|
||||
public void testLambda2() {
|
||||
@@ -64,7 +60,7 @@ public class TestClassLambda {
|
||||
List<String> list = new ArrayList<String>();
|
||||
int bottom = list.size() * 2;
|
||||
int top = list.size() * 5;
|
||||
list.removeIf( s -> (bottom >= s.length() && s.length() <= top) );
|
||||
list.removeIf(s -> (bottom >= s.length() && s.length() <= top));
|
||||
}
|
||||
|
||||
public static OptionalInt reduce(IntBinaryOperator op) {
|
||||
@@ -78,5 +74,4 @@ public class TestClassLambda {
|
||||
public static int localMax(int first, int second) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,37 +19,37 @@ public class TestClassLoop {
|
||||
|
||||
public static void testSimpleInfinite() {
|
||||
|
||||
while(true) {
|
||||
while (true) {
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void testFinally() {
|
||||
|
||||
boolean a = (Math.random() > 0);
|
||||
|
||||
while(true) {
|
||||
while (true) {
|
||||
try {
|
||||
if(!a) {
|
||||
if (!a) {
|
||||
return;
|
||||
}
|
||||
} finally {
|
||||
}
|
||||
finally {
|
||||
System.out.println("1");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void testFinallyContinue() {
|
||||
|
||||
boolean a = (Math.random() > 0);
|
||||
|
||||
for(;;) {
|
||||
for (; ; ) {
|
||||
try {
|
||||
System.out.println("1");
|
||||
} finally {
|
||||
if(a) {
|
||||
}
|
||||
finally {
|
||||
if (a) {
|
||||
System.out.println("3");
|
||||
continue;
|
||||
}
|
||||
@@ -57,7 +57,5 @@ public class TestClassLoop {
|
||||
|
||||
System.out.println("4");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ public class TestClassSwitch {
|
||||
|
||||
public void testCaseOrder(int a) {
|
||||
|
||||
switch(a) {
|
||||
switch (a) {
|
||||
case 13:
|
||||
System.out.println(13);
|
||||
return;
|
||||
@@ -27,5 +27,4 @@ public class TestClassSwitch {
|
||||
System.out.println(5);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,13 +25,14 @@ public class TestClassTypes {
|
||||
byte var7 = 0;
|
||||
long time = System.currentTimeMillis();
|
||||
|
||||
if(time % 2 > 0) {
|
||||
if (time % 2 > 0) {
|
||||
var7 = 1;
|
||||
} else if(time % 3 > 0) {
|
||||
}
|
||||
else if (time % 3 > 0) {
|
||||
var7 = 2;
|
||||
}
|
||||
|
||||
if(var7 == 1) {
|
||||
if (var7 == 1) {
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
@@ -59,11 +60,10 @@ public class TestClassTypes {
|
||||
|
||||
List a = list;
|
||||
|
||||
if(a != null) {
|
||||
if (a != null) {
|
||||
(a = new ArrayList(a)).add("23");
|
||||
}
|
||||
|
||||
System.out.println(a.size());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,16 +23,16 @@ public class TestClassVar {
|
||||
|
||||
public void testFieldSSAU() {
|
||||
|
||||
for(int i = 0; i < 10; i++) {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
|
||||
try {
|
||||
System.out.println();
|
||||
} finally {
|
||||
}
|
||||
finally {
|
||||
if (field_boolean) {
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,12 +48,12 @@ public class TestClassVar {
|
||||
|
||||
int b = a;
|
||||
|
||||
for(; a < 10 && a == 0; a++) {}
|
||||
for (; a < 10 && a == 0; a++) {
|
||||
}
|
||||
|
||||
if (b != a) {
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user