added spaces after if and inside the ternary operator
This commit is contained in:
@@ -7,7 +7,7 @@ import java.net.URL;
|
||||
public class Loader {
|
||||
public String getResource() {
|
||||
URL resource = this.getClass().getClassLoader().getResource("pkg/res/resource.txt");
|
||||
if(resource == null) {
|
||||
if (resource == null) {
|
||||
throw new RuntimeException("Resource missing");
|
||||
} else {
|
||||
try {
|
||||
|
||||
@@ -45,7 +45,7 @@ public abstract class TestAnonymousClass {
|
||||
};
|
||||
|
||||
void foo(int var1) throws Exception {
|
||||
if(var1 > 0) {// 10
|
||||
if (var1 > 0) {// 10
|
||||
TestAnonymousClass.I var2 = new TestAnonymousClass.I() {
|
||||
public void foo() throws Exception {
|
||||
boolean var1 = true;// 13
|
||||
|
||||
@@ -6,7 +6,7 @@ import java.util.List;
|
||||
public class TestClassCast {
|
||||
public void test(List var1) {
|
||||
Object var2 = var1;// 22
|
||||
if(var1 != null) {// 23
|
||||
if (var1 != null) {// 23
|
||||
((List)(var2 = new ArrayList(var1))).add("23");// 24
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ public class TestClassLoop {
|
||||
|
||||
while(true) {
|
||||
try {
|
||||
if(!var0) {// 33
|
||||
if (!var0) {// 33
|
||||
return;// 34
|
||||
}
|
||||
} finally {
|
||||
@@ -30,7 +30,7 @@ public class TestClassLoop {
|
||||
System.out.println("1");// 49
|
||||
break;
|
||||
} finally {
|
||||
if(var0) {// 52
|
||||
if (var0) {// 52
|
||||
System.out.println("3");// 53
|
||||
continue;// 54
|
||||
}
|
||||
@@ -51,19 +51,19 @@ public class TestClassLoop {
|
||||
|
||||
for(boolean var8 = false; var2 < var1; ++var2) {// 70 73 90
|
||||
char var6 = var0.charAt(var2);// 74
|
||||
if(var6 == 48) {// 75
|
||||
if (var6 == 48) {// 75
|
||||
++var7;// 76
|
||||
} else {
|
||||
if(var6 != 46) {// 77
|
||||
if (var6 != 46) {// 77
|
||||
break;
|
||||
}
|
||||
|
||||
if(var3) {// 78
|
||||
if (var3) {// 78
|
||||
throw new NumberFormatException("multiple points");// 80
|
||||
}
|
||||
|
||||
var5 = var2;// 82
|
||||
if(var4) {// 83
|
||||
if (var4) {// 83
|
||||
var5 = var2 - 1;// 84
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ public class TestClassSimpleBytecodeMapping {
|
||||
}// 18
|
||||
});
|
||||
this.test2("1");// 21
|
||||
if(Math.random() > 0.0D) {// 23
|
||||
if (Math.random() > 0.0D) {// 23
|
||||
System.out.println("0");// 24
|
||||
return 0;// 25
|
||||
} else {
|
||||
|
||||
@@ -7,13 +7,13 @@ public class TestClassTypes {
|
||||
public void testBoolean() {
|
||||
byte var1 = 0;// 25
|
||||
long var2 = System.currentTimeMillis();// 26
|
||||
if(var2 % 2L > 0L) {// 28
|
||||
if (var2 % 2L > 0L) {// 28
|
||||
var1 = 1;// 29
|
||||
} else if(var2 % 3L > 0L) {// 31
|
||||
} else if (var2 % 3L > 0L) {// 31
|
||||
var1 = 2;// 32
|
||||
}
|
||||
|
||||
if(var1 == 1) {// 35
|
||||
if (var1 == 1) {// 35
|
||||
System.out.println();// 36
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class TestClassTypes {
|
||||
|
||||
public void testAssignmentType(List var1) {
|
||||
Object var2 = var1;// 61
|
||||
if(var1 != null) {// 63
|
||||
if (var1 != null) {// 63
|
||||
((List)(var2 = new ArrayList(var1))).add("23");// 64
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ public class TestClassVar {
|
||||
try {
|
||||
System.out.println();// 29
|
||||
} finally {
|
||||
if(this.field_boolean) {// 32
|
||||
if (this.field_boolean) {// 32
|
||||
System.out.println();// 33
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class TestClassVar {
|
||||
;
|
||||
}
|
||||
|
||||
if(var2 != var1) {// 54
|
||||
if (var2 != var1) {// 54
|
||||
System.out.println();// 55
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,30 +2,30 @@ package pkg;
|
||||
|
||||
public class TestIffSimplification {
|
||||
public int simpleIff(boolean status, int[] values) {
|
||||
return status?values[0]:values[1];// 7
|
||||
return status ? values[0] : values[1];// 7
|
||||
}
|
||||
|
||||
public int simpleIf(boolean status, int[] values) {
|
||||
return status?values[0]:values[1];// 11 12 15
|
||||
return status ? values[0] : values[1];// 11 12 15
|
||||
}
|
||||
|
||||
public int nestedIf(boolean status, boolean condition, int[] values) {
|
||||
if(status) {// 20
|
||||
return condition?values[2]:values[0];// 21 22 25
|
||||
if (status) {// 20
|
||||
return condition ? values[2] : values[0];// 21 22 25
|
||||
} else {
|
||||
return values[1];// 29
|
||||
}
|
||||
}
|
||||
|
||||
public int compareTo(int mc1, int mc2, byte csg1, byte csg2, double score1, double score2, int doc1, int doc2) {
|
||||
if(mc1 != mc2) {// 34
|
||||
return mc1 < mc2?1:-1;// 35
|
||||
} else if(csg1 != csg2) {// 38
|
||||
return csg1 < csg2?1:-1;// 39
|
||||
} else if(Math.abs(score1 - score2) < 1.0E-6D) {// 42
|
||||
return doc1 < doc2?-1:1;// 43
|
||||
if (mc1 != mc2) {// 34
|
||||
return mc1 < mc2 ? 1 : -1;// 35
|
||||
} else if (csg1 != csg2) {// 38
|
||||
return csg1 < csg2 ? 1 : -1;// 39
|
||||
} else if (Math.abs(score1 - score2) < 1.0E-6D) {// 42
|
||||
return doc1 < doc2 ? -1 : 1;// 43
|
||||
} else {
|
||||
return score1 < score2?1:-1;// 46
|
||||
return score1 < score2 ? 1 : -1;// 46
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ public final class TestKotlinConstructorKt {
|
||||
Object item$iv$iv = var4.next();
|
||||
String it = (String)item$iv$iv;// 12
|
||||
Mapping var10000 = new Mapping;
|
||||
if(it == null) {// 3
|
||||
if (it == null) {// 3
|
||||
throw new TypeCastException("null cannot be cast to non-null type kotlin.String");
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import java.io.File;
|
||||
|
||||
public class TestLocalsNames {
|
||||
private static void rename(File file, boolean recursively) {
|
||||
if(file.isDirectory()) {// 22
|
||||
if (file.isDirectory()) {// 22
|
||||
long start = System.currentTimeMillis();// 23
|
||||
File[] files = file.listFiles();// 25
|
||||
File[] var5 = files;
|
||||
|
||||
@@ -4,7 +4,7 @@ public class TestThrowException {
|
||||
Runnable r;
|
||||
|
||||
public TestThrowException(int var1) {
|
||||
if(var1 > 0) {// 9
|
||||
if (var1 > 0) {// 9
|
||||
throw new IllegalArgumentException("xxx");// 10
|
||||
} else {
|
||||
this.r = new Runnable() {// 12
|
||||
|
||||
@@ -17,9 +17,9 @@ public class TestTryCatchFinally {
|
||||
}// 36
|
||||
|
||||
int foo(int var1) throws Exception {
|
||||
if(var1 < 1) {// 39
|
||||
if (var1 < 1) {// 39
|
||||
throw new RuntimeException();// 40
|
||||
} else if(var1 < 5) {// 41
|
||||
} else if (var1 < 5) {// 41
|
||||
return var1;// 42
|
||||
} else {
|
||||
throw new Exception();// 45
|
||||
|
||||
Reference in New Issue
Block a user