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

master
Roman Shevchenko 10 years ago
parent e629738a46
commit c0c83126a6
  1. BIN
      testData/classes/pkg/TestClassLambda.class
  2. 4
      testData/results/TestClassLambda.dec
  3. 17
      testData/src/pkg/TestClassLambda.java
  4. 10
      testData/src/pkg/TestClassLoop.java
  5. 1
      testData/src/pkg/TestClassSwitch.java
  6. 4
      testData/src/pkg/TestClassTypes.java
  7. 8
      testData/src/pkg/TestClassVar.java

@ -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() {
@ -78,5 +74,4 @@ public class TestClassLambda {
public static int localMax(int first, int second) {
return 0;
}
}

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

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

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

@ -27,12 +27,12 @@ public class TestClassVar {
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();
}
}
}
}

Loading…
Cancel
Save