[java-decompiler] test data cleanup; warnings

This commit is contained in:
Roman Shevchenko
2016-03-18 18:02:33 +01:00
parent 1359577355
commit 93a39b7b50
18 changed files with 53 additions and 116 deletions

View File

@@ -1,26 +1,37 @@
package pkg;
public class TestClassFields {
static int staticMutable;
private static int[] sizes;
private static String[] names = new String[]{"name1", "name2"};
private static final int SIZE;
static {
sizes = new int[names.length];// 27
}// 28
sizes = new int[names.length];// 15
TestClassFields.Inner.staticMutable = 3;// 17
SIZE = TestClassFields.Inner.staticMutable;// 14 18
}// 19
private static class Inner {
private static int staticMutable;
}
}
class 'pkg/TestClassFields' {
method '<clinit> ()V' {
0 10
2 9
11 8
14 8
17 8
1a 9
22 10
25 11
}
}
Lines mapping:
27 <-> 9
28 <-> 10
Not mapped:
26
14 <-> 11
15 <-> 9
17 <-> 10
18 <-> 11
19 <-> 12

View File

@@ -0,0 +1,9 @@
package pkg;
import java.math.BigDecimal;
public interface TestInterfaceFields {
BigDecimal BIG_ZERO = BigDecimal.ZERO;
int MAX_BYTE_VALUE = 127;
}

View File

@@ -1,8 +0,0 @@
package pkg;
import java.math.BigDecimal;
public interface TestInterfaceWithObjectField {
BigDecimal BUGS_IN_THE_DECOMPILER = BigDecimal.ZERO;
}

View File

@@ -1,6 +0,0 @@
package pkg;
public interface TestInterfaceWithPrimitiveField {
int MAX_BYTE_VALUE = 127;
}

View File

@@ -1,27 +0,0 @@
package pkg;
import pkg.TestClassFields;
public class TestMutableStaticOtherClass {
private static final int SIZE;
static {
TestClassFields.staticMutable = 3;// 12
SIZE = TestClassFields.staticMutable;// 13
}// 14
}
class 'pkg/TestMutableStaticOtherClass' {
method '<clinit> ()V' {
0 8
1 8
4 9
7 9
a 10
}
}
Lines mapping:
12 <-> 9
13 <-> 10
14 <-> 11