mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java-decompiler] IDEA-363089 Broken line mapping for finally
- use first line description, preserve finally offset for mapping (cherry picked from commit b404b8627b19c28b190c1600d4d2283098e44ac7) IJ-CR-149177 GitOrigin-RevId: e4813fd394022fbcf365fffba4b858865dac5f09
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f4991dbf3c
commit
9ae741194f
+1
-1
@@ -83,7 +83,7 @@ public class BytecodeMappingTracer {
|
||||
int originalOffset = data[i];
|
||||
int originalLine = data[i + 1];
|
||||
Integer newLine = mapping.get(originalOffset);
|
||||
if (newLine != null) {
|
||||
if (newLine != null && !res.containsKey(originalLine)) {
|
||||
res.put(originalLine, newLine);
|
||||
}
|
||||
else {
|
||||
|
||||
+1
-1
@@ -924,7 +924,7 @@ public class FinallyProcessor {
|
||||
if ((blockType & 1) > 0) { // first
|
||||
if (finallyType == 2 || finallyType == 1) { // `AStore` or `Pop`
|
||||
seq.removeInstruction(0);
|
||||
instrOldOffsets.remove(0);
|
||||
// don't delete offset, because it is crucial for line-mapping
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -253,5 +253,6 @@ public class SingleClassesTest extends SingleClassesTestBase {
|
||||
@Test public void testGenericInit() { doTest("pkg/TestInitGeneric"); }
|
||||
@Test public void testNotNullRecord() { doTest("pkg/TestNotNullRecord"); }
|
||||
@Test public void testNestedInheritor() { doTest("pkg/TestNestedInheritor"); }
|
||||
@Test public void testTryCatchFinallyMismatched() { doTest("pkg/TestTryCatchFinallyMismatched"); }
|
||||
|
||||
}
|
||||
|
||||
BIN
Binary file not shown.
@@ -95,12 +95,12 @@ class 'pkg/TestClassLoop' {
|
||||
e 14
|
||||
f 14
|
||||
1a 15
|
||||
26 18
|
||||
27 18
|
||||
28 18
|
||||
29 18
|
||||
2a 18
|
||||
2b 18
|
||||
2c 18
|
||||
}
|
||||
|
||||
method 'testFinallyContinue ()V' {
|
||||
@@ -116,8 +116,8 @@ class 'pkg/TestClassLoop' {
|
||||
11 29
|
||||
12 29
|
||||
13 29
|
||||
25 32
|
||||
26 32
|
||||
27 32
|
||||
2a 33
|
||||
2b 33
|
||||
2c 33
|
||||
|
||||
@@ -118,12 +118,12 @@ class 'pkg/TestClassSimpleBytecodeMapping' {
|
||||
12 24
|
||||
13 24
|
||||
15 24
|
||||
23 26
|
||||
24 26
|
||||
25 26
|
||||
26 26
|
||||
27 26
|
||||
28 26
|
||||
29 26
|
||||
2e 29
|
||||
}
|
||||
|
||||
|
||||
@@ -50,11 +50,11 @@ class 'pkg/TestClassVar' {
|
||||
9 9
|
||||
a 9
|
||||
b 9
|
||||
1e 11
|
||||
1f 11
|
||||
20 11
|
||||
21 11
|
||||
22 11
|
||||
23 11
|
||||
26 12
|
||||
27 12
|
||||
28 12
|
||||
|
||||
+15
-15
@@ -5,43 +5,43 @@ public class TestComplexInstanceOfRecordPatternJavac {
|
||||
}// 6
|
||||
|
||||
public static void instanceOfTest1(Object o) {
|
||||
if (o instanceof R(R(Object s1))) {
|
||||
if (o instanceof R(R(Object s1))) {// 9
|
||||
System.out.println(s1);// 10
|
||||
System.out.println(s1);// 11
|
||||
}
|
||||
|
||||
System.out.println("1");// 13
|
||||
}// 9
|
||||
}
|
||||
|
||||
public static void instanceOfTest2(Object o) {
|
||||
if (o instanceof R(R(String s1))) {
|
||||
if (o instanceof R(R(String s1))) {// 17
|
||||
System.out.println(s1);// 18
|
||||
System.out.println(s1);// 19
|
||||
}
|
||||
|
||||
System.out.println("4");// 21
|
||||
}// 17
|
||||
}
|
||||
|
||||
public static void instanceOfTest3(Object o) {
|
||||
if (o instanceof R2(String s1, Object var9)) {
|
||||
if (o instanceof R2(String s1, Object var9)) {// 25
|
||||
System.out.println(s1);// 26
|
||||
System.out.println(s1);// 27
|
||||
}
|
||||
|
||||
System.out.println("12");// 29
|
||||
}// 25
|
||||
}
|
||||
|
||||
public static void instanceOfTest3_2(Object o) {
|
||||
if (o instanceof R2(Object var9, String s1)) {
|
||||
if (o instanceof R2(Object var9, String s1)) {// 33
|
||||
System.out.println(s1);// 34
|
||||
System.out.println(s1);// 35
|
||||
}
|
||||
|
||||
System.out.println("3");// 37
|
||||
}// 33
|
||||
}
|
||||
|
||||
public static void instanceOfTest4(Object o) {
|
||||
if (o instanceof R2(String s1, R(String s))) {
|
||||
if (o instanceof R2(String s1, R(String s))) {// 41
|
||||
System.out.println(s1);// 42
|
||||
System.out.println(s);// 43
|
||||
if (o instanceof R2(String s2, R(String s3))) {// 45
|
||||
@@ -51,7 +51,7 @@ public class TestComplexInstanceOfRecordPatternJavac {
|
||||
}
|
||||
|
||||
System.out.println("1");// 50
|
||||
}// 41
|
||||
}
|
||||
|
||||
static record R(Object o) {
|
||||
R(Object o) {
|
||||
@@ -385,23 +385,23 @@ class 'pkg/TestComplexInstanceOfRecordPatternJavac$R2' {
|
||||
|
||||
Lines mapping:
|
||||
6 <-> 5
|
||||
9 <-> 14
|
||||
9 <-> 8
|
||||
10 <-> 9
|
||||
11 <-> 10
|
||||
13 <-> 13
|
||||
17 <-> 23
|
||||
17 <-> 17
|
||||
18 <-> 18
|
||||
19 <-> 19
|
||||
21 <-> 22
|
||||
25 <-> 32
|
||||
25 <-> 26
|
||||
26 <-> 27
|
||||
27 <-> 28
|
||||
29 <-> 31
|
||||
33 <-> 41
|
||||
33 <-> 35
|
||||
34 <-> 36
|
||||
35 <-> 37
|
||||
37 <-> 40
|
||||
41 <-> 54
|
||||
41 <-> 44
|
||||
42 <-> 45
|
||||
43 <-> 46
|
||||
45 <-> 47
|
||||
|
||||
@@ -35,14 +35,14 @@ class 'pkg/TestFinally' {
|
||||
34 9
|
||||
65 10
|
||||
6e 11
|
||||
6f 13
|
||||
70 13
|
||||
71 13
|
||||
72 13
|
||||
73 13
|
||||
74 13
|
||||
75 13
|
||||
76 13
|
||||
77 13
|
||||
78 13
|
||||
83 13
|
||||
84 13
|
||||
85 13
|
||||
|
||||
@@ -14,7 +14,7 @@ import kotlin.collections.CollectionsKt;
|
||||
)
|
||||
public final class TestKotlinConstructorKt {
|
||||
private static final List<Mapping> foo(Collection<String> list) {
|
||||
Iterable $receiver$iv = (Iterable)list;// 2
|
||||
Iterable $receiver$iv = (Iterable)list;// 2 4
|
||||
Collection destination$iv$iv = (Collection)(new ArrayList(CollectionsKt.collectionSizeOrDefault($receiver$iv, 10)));
|
||||
|
||||
for(Object item$iv$iv : $receiver$iv) {// 10 11
|
||||
@@ -29,7 +29,7 @@ public final class TestKotlinConstructorKt {
|
||||
destination$iv$iv.add(var11);// 12
|
||||
}
|
||||
|
||||
return CollectionsKt.toList((Iterable)((List)destination$iv$iv));// 4 13
|
||||
return CollectionsKt.toList((Iterable)((List)destination$iv$iv));// 13
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ class 'TestKotlinConstructorKt' {
|
||||
Lines mapping:
|
||||
2 <-> 17
|
||||
3 <-> 23
|
||||
4 <-> 32
|
||||
4 <-> 17
|
||||
10 <-> 20
|
||||
11 <-> 20
|
||||
12 <-> 29
|
||||
|
||||
@@ -62,7 +62,7 @@ public final class TestNamedSuspendFun2Kt {
|
||||
label486: {
|
||||
label452: {
|
||||
Object var2 = var3.data;
|
||||
var4 = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
var4 = IntrinsicsKt.getCOROUTINE_SUSPENDED();// 2
|
||||
switch (var3.label) {
|
||||
case 0:
|
||||
if (var2 instanceof SuccessOrFailure.Failure) {
|
||||
@@ -104,7 +104,7 @@ public final class TestNamedSuspendFun2Kt {
|
||||
throw ((SuccessOrFailure.Failure)var2).exception;
|
||||
}
|
||||
|
||||
return 1;// 2 3 8 9 11
|
||||
return 1;// 3 9 11
|
||||
case 3:
|
||||
if (var2 instanceof SuccessOrFailure.Failure) {
|
||||
throw ((SuccessOrFailure.Failure)var2).exception;
|
||||
@@ -155,7 +155,7 @@ public final class TestNamedSuspendFun2Kt {
|
||||
|
||||
var3.I$0 = x;
|
||||
var3.label = 2;
|
||||
if (bar(var3) == var4) {
|
||||
if (bar(var3) == var4) {// 8
|
||||
return var4;
|
||||
}
|
||||
|
||||
@@ -455,11 +455,11 @@ class 'TestNamedSuspendFun2Kt' {
|
||||
}
|
||||
|
||||
Lines mapping:
|
||||
2 <-> 107
|
||||
2 <-> 65
|
||||
3 <-> 107
|
||||
5 <-> 127
|
||||
6 <-> 86
|
||||
8 <-> 107
|
||||
8 <-> 158
|
||||
9 <-> 107
|
||||
11 <-> 107
|
||||
14 <-> 177
|
||||
|
||||
+18
-18
@@ -5,12 +5,12 @@ public class TestSimpleInstanceOfRecordPatternJavac {
|
||||
}// 6
|
||||
|
||||
public static void instanceOfTest1(Object o) {
|
||||
if (o instanceof R(Object s1)) {
|
||||
if (o instanceof R(Object s1)) {// 9
|
||||
System.out.println(s1);// 10
|
||||
}
|
||||
|
||||
System.out.println("1");// 12
|
||||
}// 9
|
||||
}
|
||||
|
||||
public static void tryInstanceOfTest1(Object o) {
|
||||
int a = 1;// 16
|
||||
@@ -38,7 +38,7 @@ public class TestSimpleInstanceOfRecordPatternJavac {
|
||||
}// 30 35
|
||||
|
||||
public static void instanceOfTest2(Object o) {
|
||||
if (o instanceof R(String s1)) {
|
||||
if (o instanceof R(String s1)) {// 38
|
||||
System.out.println(s1);// 39
|
||||
if (s1.hashCode() == 1) {// 40
|
||||
System.out.println("1");// 41
|
||||
@@ -46,10 +46,10 @@ public class TestSimpleInstanceOfRecordPatternJavac {
|
||||
}
|
||||
|
||||
System.out.println("5");// 44
|
||||
}// 38
|
||||
}
|
||||
|
||||
public static void instanceOfTest3(Object o) {
|
||||
if (o instanceof R(String s1)) {
|
||||
if (o instanceof R(String s1)) {// 48
|
||||
if (s1.isEmpty()) {// 49
|
||||
System.out.println("111");// 50
|
||||
System.out.println("111");// 51
|
||||
@@ -60,10 +60,10 @@ public class TestSimpleInstanceOfRecordPatternJavac {
|
||||
|
||||
System.out.println("s222222222222");// 56
|
||||
System.out.println("s222222222222");// 57
|
||||
}// 48
|
||||
}
|
||||
|
||||
public static void instanceOfTest4(Object o) {
|
||||
if (o.hashCode() == 1 && o instanceof R(String s1)) {// 61
|
||||
if (o.hashCode() == 1 && o instanceof R(String s1)) {// 61 62
|
||||
if (o instanceof R(String s2)) {// 63
|
||||
if (s1.isEmpty()) {// 64
|
||||
System.out.println("111");// 65
|
||||
@@ -76,31 +76,31 @@ public class TestSimpleInstanceOfRecordPatternJavac {
|
||||
|
||||
System.out.println("s222222222222");// 73
|
||||
System.out.println("s222222222222");// 74
|
||||
}// 62
|
||||
}
|
||||
|
||||
public static void instanceOfTestDouble1(Object o, Object o2) {
|
||||
if (o instanceof R(Object s1)) {// 78
|
||||
System.out.println(s1);// 79
|
||||
}
|
||||
|
||||
if (o2 instanceof R(Object s1)) {
|
||||
if (o2 instanceof R(Object s1)) {// 82
|
||||
System.out.println(s1);// 83
|
||||
}
|
||||
|
||||
System.out.println("s2222222");// 85
|
||||
}// 82
|
||||
}
|
||||
|
||||
public static void instanceOfTestDouble2(Object o, Object o2) {
|
||||
if (o instanceof R(Object s1)) {// 89
|
||||
System.out.println(s1);// 90
|
||||
}
|
||||
|
||||
if (o2 instanceof R(String r)) {
|
||||
if (o2 instanceof R(String r)) {// 93
|
||||
System.out.println(r);// 94
|
||||
}
|
||||
|
||||
System.out.println("2222222");// 96
|
||||
}// 93
|
||||
}
|
||||
|
||||
public static void instanceOfTestDoubleNegate2(Object o, Object o2) {
|
||||
if (o instanceof R(Object s1)) {// 100
|
||||
@@ -592,7 +592,7 @@ class 'pkg/TestSimpleInstanceOfRecordPatternJavac$R' {
|
||||
|
||||
Lines mapping:
|
||||
6 <-> 5
|
||||
9 <-> 13
|
||||
9 <-> 8
|
||||
10 <-> 9
|
||||
12 <-> 12
|
||||
16 <-> 16
|
||||
@@ -608,12 +608,12 @@ Lines mapping:
|
||||
32 <-> 33
|
||||
33 <-> 34
|
||||
35 <-> 38
|
||||
38 <-> 49
|
||||
38 <-> 41
|
||||
39 <-> 42
|
||||
40 <-> 43
|
||||
41 <-> 44
|
||||
44 <-> 48
|
||||
48 <-> 63
|
||||
48 <-> 52
|
||||
49 <-> 53
|
||||
50 <-> 54
|
||||
51 <-> 55
|
||||
@@ -622,7 +622,7 @@ Lines mapping:
|
||||
56 <-> 61
|
||||
57 <-> 62
|
||||
61 <-> 66
|
||||
62 <-> 79
|
||||
62 <-> 66
|
||||
63 <-> 67
|
||||
64 <-> 68
|
||||
65 <-> 69
|
||||
@@ -633,12 +633,12 @@ Lines mapping:
|
||||
74 <-> 78
|
||||
78 <-> 82
|
||||
79 <-> 83
|
||||
82 <-> 91
|
||||
82 <-> 86
|
||||
83 <-> 87
|
||||
85 <-> 90
|
||||
89 <-> 94
|
||||
90 <-> 95
|
||||
93 <-> 103
|
||||
93 <-> 98
|
||||
94 <-> 99
|
||||
96 <-> 102
|
||||
100 <-> 106
|
||||
|
||||
+6
-6
@@ -4,7 +4,7 @@ public class TestSwitchClassReferencesFastExitEcj {
|
||||
public static void testObject(Object o) {
|
||||
label16:
|
||||
while(true) {
|
||||
int i = 0;
|
||||
int i = 0;// 7
|
||||
|
||||
while(i < o.hashCode()) {
|
||||
switch (o) {// 8
|
||||
@@ -12,7 +12,7 @@ public class TestSwitchClassReferencesFastExitEcj {
|
||||
System.out.println("s");// 10
|
||||
System.exit(0);// 11
|
||||
++i;// 12 13 14 15 16 17 18
|
||||
break;// 7
|
||||
break;
|
||||
case Integer in:
|
||||
System.out.println("ii");
|
||||
continue label16;
|
||||
@@ -27,7 +27,7 @@ public class TestSwitchClassReferencesFastExitEcj {
|
||||
public static void testObject2(Object o) {
|
||||
label16:
|
||||
while(true) {
|
||||
int i = 0;
|
||||
int i = 0;// 27
|
||||
|
||||
while(i < o.hashCode()) {
|
||||
switch (o) {// 28
|
||||
@@ -35,7 +35,7 @@ public class TestSwitchClassReferencesFastExitEcj {
|
||||
System.out.println("s");// 30
|
||||
System.exit(0);// 31
|
||||
++i;// 32 34 35 36 38 39 40
|
||||
break;// 27
|
||||
break;
|
||||
case Integer in:
|
||||
System.out.println("ii");
|
||||
continue label16;
|
||||
@@ -190,7 +190,7 @@ class 'pkg/TestSwitchClassReferencesFastExitEcj' {
|
||||
|
||||
Lines mapping:
|
||||
6 <-> 21
|
||||
7 <-> 15
|
||||
7 <-> 7
|
||||
8 <-> 10
|
||||
9 <-> 11
|
||||
10 <-> 12
|
||||
@@ -203,7 +203,7 @@ Lines mapping:
|
||||
17 <-> 14
|
||||
18 <-> 14
|
||||
26 <-> 44
|
||||
27 <-> 38
|
||||
27 <-> 30
|
||||
28 <-> 33
|
||||
29 <-> 34
|
||||
30 <-> 35
|
||||
|
||||
+6
-6
@@ -4,7 +4,7 @@ public class TestSwitchClassReferencesFastExitJavac {
|
||||
public static void testObject(Object o) {
|
||||
label15:
|
||||
while(true) {
|
||||
int i = 0;
|
||||
int i = 0;// 8
|
||||
|
||||
while(i < o.hashCode()) {
|
||||
switch (o) {// 9
|
||||
@@ -18,7 +18,7 @@ public class TestSwitchClassReferencesFastExitJavac {
|
||||
continue label15;
|
||||
default:
|
||||
System.out.println("s");
|
||||
return;// 8
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ public class TestSwitchClassReferencesFastExitJavac {
|
||||
public static void testObject2(Object o) {
|
||||
label15:
|
||||
while(true) {
|
||||
int i = 0;
|
||||
int i = 0;// 28
|
||||
|
||||
while(i < o.hashCode()) {
|
||||
switch (o) {// 29
|
||||
@@ -41,7 +41,7 @@ public class TestSwitchClassReferencesFastExitJavac {
|
||||
continue label15;
|
||||
default:
|
||||
System.out.println("s");
|
||||
return;// 28
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -191,7 +191,7 @@ class 'pkg/TestSwitchClassReferencesFastExitJavac' {
|
||||
}
|
||||
|
||||
Lines mapping:
|
||||
8 <-> 21
|
||||
8 <-> 7
|
||||
9 <-> 10
|
||||
10 <-> 11
|
||||
11 <-> 12
|
||||
@@ -203,7 +203,7 @@ Lines mapping:
|
||||
17 <-> 14
|
||||
18 <-> 14
|
||||
19 <-> 14
|
||||
28 <-> 44
|
||||
28 <-> 30
|
||||
29 <-> 33
|
||||
30 <-> 34
|
||||
31 <-> 35
|
||||
|
||||
@@ -197,12 +197,13 @@ class 'pkg/TestSwitchGuarded2Javac' {
|
||||
72 21
|
||||
73 21
|
||||
74 21
|
||||
82 23
|
||||
83 23
|
||||
84 23
|
||||
85 23
|
||||
86 23
|
||||
87 23
|
||||
88 23
|
||||
89 23
|
||||
8f 18
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -188,10 +188,10 @@ public class TestSwitchNestedDeconstructionsJavac {
|
||||
} catch (Exception var16) {// 169
|
||||
switch (o2) {// 170
|
||||
case R2(Number s, String s2):
|
||||
System.out.println("10");// 171 172
|
||||
System.out.println("10");// 171 172 177
|
||||
return;// 180
|
||||
case R2(String s, Number s2):
|
||||
System.out.println(o);// 174 175 177
|
||||
System.out.println(o);// 174 175
|
||||
return;
|
||||
default:
|
||||
System.out.println(o);
|
||||
@@ -1022,7 +1022,7 @@ Lines mapping:
|
||||
172 <-> 191
|
||||
174 <-> 194
|
||||
175 <-> 194
|
||||
177 <-> 194
|
||||
177 <-> 191
|
||||
180 <-> 192
|
||||
183 <-> 225
|
||||
Not mapped:
|
||||
|
||||
@@ -118,7 +118,7 @@ public class TestSwitchOnStringsJavac {
|
||||
}
|
||||
} catch (NullPointerException var6) {// 135
|
||||
NullPointerException e = var6;
|
||||
int i = 0;
|
||||
int i = 0;// 136
|
||||
|
||||
while(i < 10) {
|
||||
switch (this.getStr()) {// 137
|
||||
@@ -126,7 +126,7 @@ public class TestSwitchOnStringsJavac {
|
||||
default -> System.out.println(e.getMessage());// 139
|
||||
}
|
||||
|
||||
++i;// 136
|
||||
++i;
|
||||
}
|
||||
|
||||
System.out.println(9);// 142
|
||||
@@ -631,7 +631,7 @@ Lines mapping:
|
||||
131 <-> 117
|
||||
133 <-> 112
|
||||
135 <-> 119
|
||||
136 <-> 129
|
||||
136 <-> 121
|
||||
137 <-> 124
|
||||
138 <-> 125
|
||||
139 <-> 126
|
||||
|
||||
+15
-15
@@ -7,7 +7,7 @@ public class TestSwitchPatternWithExpression {
|
||||
|
||||
private static String getX(I i) {
|
||||
String var12;
|
||||
switch (i) {
|
||||
switch (i) {// 21
|
||||
case A(String a):
|
||||
var12 = a;// 22
|
||||
break;
|
||||
@@ -16,7 +16,7 @@ public class TestSwitchPatternWithExpression {
|
||||
break;
|
||||
}
|
||||
|
||||
return var12;// 21
|
||||
return var12;
|
||||
}
|
||||
|
||||
private static String getX8(I i) {
|
||||
@@ -30,7 +30,7 @@ public class TestSwitchPatternWithExpression {
|
||||
|
||||
private static String getX0(AA i) {
|
||||
String var18;
|
||||
switch (i) {
|
||||
switch (i) {// 39
|
||||
case AA(A(String a)):
|
||||
var18 = a;
|
||||
break;// 40
|
||||
@@ -38,7 +38,7 @@ public class TestSwitchPatternWithExpression {
|
||||
var18 = a;// 41
|
||||
}
|
||||
|
||||
return var18;// 39
|
||||
return var18;
|
||||
}
|
||||
|
||||
private static void getX11(AA i) {
|
||||
@@ -118,7 +118,7 @@ public class TestSwitchPatternWithExpression {
|
||||
|
||||
private static String getX3(I i) {
|
||||
String var12;
|
||||
switch (i) {
|
||||
switch (i) {// 86
|
||||
case A(String a):
|
||||
System.out.println(a);// 87 88
|
||||
var12 = a;
|
||||
@@ -129,12 +129,12 @@ public class TestSwitchPatternWithExpression {
|
||||
break;
|
||||
}
|
||||
|
||||
return var12;// 86
|
||||
return var12;
|
||||
}
|
||||
|
||||
private static String getX6(I i) {
|
||||
String var12;
|
||||
switch (i) {
|
||||
switch (i) {// 100
|
||||
case A(String a):
|
||||
System.out.println(a);// 101 102
|
||||
var12 = a;
|
||||
@@ -145,12 +145,12 @@ public class TestSwitchPatternWithExpression {
|
||||
break;
|
||||
}
|
||||
|
||||
return var12;// 100
|
||||
return var12;
|
||||
}
|
||||
|
||||
private static String getX7(I i) {
|
||||
String var12;
|
||||
switch (i) {
|
||||
switch (i) {// 113
|
||||
case A(String a):
|
||||
System.out.println(a);// 114 115
|
||||
System.out.println(a);// 116
|
||||
@@ -163,7 +163,7 @@ public class TestSwitchPatternWithExpression {
|
||||
break;
|
||||
}
|
||||
|
||||
return var12;// 113
|
||||
return var12;
|
||||
}
|
||||
|
||||
private static String getX2(I i) {
|
||||
@@ -571,7 +571,7 @@ Lines mapping:
|
||||
13 <-> 206
|
||||
17 <-> 5
|
||||
18 <-> 6
|
||||
21 <-> 19
|
||||
21 <-> 10
|
||||
22 <-> 12
|
||||
23 <-> 15
|
||||
28 <-> 23
|
||||
@@ -579,7 +579,7 @@ Lines mapping:
|
||||
30 <-> 25
|
||||
32 <-> 27
|
||||
33 <-> 27
|
||||
39 <-> 41
|
||||
39 <-> 33
|
||||
40 <-> 36
|
||||
41 <-> 38
|
||||
46 <-> 46
|
||||
@@ -602,20 +602,20 @@ Lines mapping:
|
||||
79 <-> 108
|
||||
80 <-> 117
|
||||
82 <-> 116
|
||||
86 <-> 132
|
||||
86 <-> 121
|
||||
87 <-> 123
|
||||
88 <-> 123
|
||||
89 <-> 125
|
||||
91 <-> 127
|
||||
92 <-> 127
|
||||
100 <-> 148
|
||||
100 <-> 137
|
||||
101 <-> 139
|
||||
102 <-> 139
|
||||
103 <-> 141
|
||||
105 <-> 143
|
||||
106 <-> 143
|
||||
107 <-> 144
|
||||
113 <-> 166
|
||||
113 <-> 153
|
||||
114 <-> 155
|
||||
115 <-> 155
|
||||
116 <-> 156
|
||||
|
||||
@@ -13,10 +13,10 @@ import kotlin.Unit;
|
||||
)
|
||||
public final class TestSynchronizedUnprotected {
|
||||
public final void test() {
|
||||
synchronized(this) {
|
||||
synchronized(this) {// 5
|
||||
String var2 = "Boom";// 6
|
||||
System.out.println(var2);
|
||||
Unit $i$a$1$synchronized = Unit.INSTANCE;// 5 7
|
||||
Unit $i$a$1$synchronized = Unit.INSTANCE;// 7
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,7 @@ class 'pkg/TestSynchronizedUnprotected' {
|
||||
}
|
||||
|
||||
Lines mapping:
|
||||
5 <-> 19
|
||||
5 <-> 16
|
||||
6 <-> 17
|
||||
7 <-> 19
|
||||
Not mapped:
|
||||
|
||||
@@ -32,10 +32,10 @@ public class TestTryCatchFinally {
|
||||
} catch (Exception var6) {// 52
|
||||
System.out.println("Error" + var6);// 53
|
||||
} finally {
|
||||
System.out.println("Finally");
|
||||
System.out.println("Finally");// 55
|
||||
}
|
||||
|
||||
return -1;// 55 56 57
|
||||
return -1;// 56 57
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,12 +54,13 @@ class 'pkg/TestTryCatchFinally' {
|
||||
18 8
|
||||
19 8
|
||||
1f 9
|
||||
2b 12
|
||||
2c 12
|
||||
2d 12
|
||||
2e 12
|
||||
2f 12
|
||||
30 12
|
||||
31 12
|
||||
32 12
|
||||
38 15
|
||||
}
|
||||
|
||||
@@ -97,13 +98,13 @@ class 'pkg/TestTryCatchFinally' {
|
||||
31 37
|
||||
32 37
|
||||
33 37
|
||||
34 37
|
||||
34 34
|
||||
35 34
|
||||
36 34
|
||||
37 34
|
||||
38 34
|
||||
39 34
|
||||
3a 34
|
||||
3a 37
|
||||
3b 37
|
||||
3c 37
|
||||
3d 37
|
||||
@@ -126,7 +127,7 @@ Lines mapping:
|
||||
51 <-> 30
|
||||
52 <-> 32
|
||||
53 <-> 33
|
||||
55 <-> 38
|
||||
55 <-> 35
|
||||
56 <-> 38
|
||||
57 <-> 38
|
||||
Not mapped:
|
||||
|
||||
@@ -54,6 +54,8 @@ class 'pkg/TestTryCatchFinallyJsrRet' {
|
||||
13 8
|
||||
14 8
|
||||
1a 9
|
||||
21 12
|
||||
22 12
|
||||
23 12
|
||||
24 12
|
||||
25 12
|
||||
@@ -62,9 +64,6 @@ class 'pkg/TestTryCatchFinallyJsrRet' {
|
||||
28 12
|
||||
29 12
|
||||
2a 12
|
||||
2b 12
|
||||
2c 12
|
||||
2d 12
|
||||
35 15
|
||||
}
|
||||
|
||||
@@ -99,6 +98,7 @@ class 'pkg/TestTryCatchFinallyJsrRet' {
|
||||
21 32
|
||||
22 32
|
||||
23 32
|
||||
2a 34
|
||||
2b 34
|
||||
2c 34
|
||||
2d 34
|
||||
@@ -106,9 +106,6 @@ class 'pkg/TestTryCatchFinallyJsrRet' {
|
||||
2f 34
|
||||
30 34
|
||||
31 34
|
||||
32 34
|
||||
33 34
|
||||
34 34
|
||||
37 30
|
||||
38 30
|
||||
39 30
|
||||
|
||||
@@ -0,0 +1,286 @@
|
||||
package pkg;
|
||||
|
||||
public class TestTryCatchFinallyMismatched {
|
||||
public static void main(String[] args) {
|
||||
}// 6
|
||||
|
||||
public int test(String a) {
|
||||
try {
|
||||
int e = Integer.parseInt(a);// 10
|
||||
return e;
|
||||
} catch (Exception e) {// 11
|
||||
System.out.println("Error" + String.valueOf(e));// 12
|
||||
} finally {
|
||||
System.out.println("Finally");// 14
|
||||
System.out.println("Finally");// 15
|
||||
}
|
||||
|
||||
return -1;// 16 17
|
||||
}
|
||||
|
||||
public int test2(String a) {
|
||||
int var2;
|
||||
try {
|
||||
var2 = Integer.parseInt(a);// 22
|
||||
} finally {
|
||||
System.out.println("Finally");// 24
|
||||
System.out.println("Finally");// 25
|
||||
}
|
||||
|
||||
return var2;
|
||||
}
|
||||
|
||||
public int test3(String a) {
|
||||
int a2 = 1;// 30
|
||||
|
||||
try {
|
||||
int e = Integer.parseInt(a);// 32
|
||||
return e;
|
||||
} catch (Exception e) {// 33
|
||||
System.out.println("Error" + String.valueOf(e));// 34
|
||||
} finally {
|
||||
a2 = 3 + a.length();// 36
|
||||
System.out.println("Finally");// 37
|
||||
System.out.println("Finally");// 38
|
||||
}
|
||||
|
||||
return a2;// 39 40
|
||||
}
|
||||
|
||||
public int test4(String a) {
|
||||
try {
|
||||
int test = Integer.parseInt(a);// 45
|
||||
return test;
|
||||
} catch (Exception e) {// 46
|
||||
System.out.println("Error" + String.valueOf(e));// 47
|
||||
} finally {
|
||||
String test = "test";// 49
|
||||
System.out.println("Finally" + test);// 50
|
||||
System.out.println("Finally");// 51
|
||||
}
|
||||
|
||||
return 1;// 52 53
|
||||
}
|
||||
}
|
||||
|
||||
class 'pkg/TestTryCatchFinallyMismatched' {
|
||||
method 'main ([Ljava/lang/String;)V' {
|
||||
0 4
|
||||
}
|
||||
|
||||
method 'test (Ljava/lang/String;)I' {
|
||||
0 8
|
||||
1 8
|
||||
2 8
|
||||
3 8
|
||||
4 8
|
||||
15 9
|
||||
16 9
|
||||
17 10
|
||||
18 11
|
||||
19 11
|
||||
1a 11
|
||||
1c 11
|
||||
1d 11
|
||||
1e 11
|
||||
1f 11
|
||||
20 11
|
||||
21 11
|
||||
22 11
|
||||
23 11
|
||||
24 11
|
||||
37 17
|
||||
38 17
|
||||
39 17
|
||||
3a 13
|
||||
3b 13
|
||||
3c 13
|
||||
3d 13
|
||||
3e 13
|
||||
3f 13
|
||||
40 14
|
||||
41 14
|
||||
42 14
|
||||
43 14
|
||||
44 14
|
||||
45 14
|
||||
46 14
|
||||
47 14
|
||||
48 17
|
||||
49 17
|
||||
4a 17
|
||||
4b 17
|
||||
4c 17
|
||||
4d 17
|
||||
}
|
||||
|
||||
method 'test2 (Ljava/lang/String;)I' {
|
||||
0 23
|
||||
1 23
|
||||
2 23
|
||||
3 23
|
||||
4 23
|
||||
15 29
|
||||
16 29
|
||||
17 25
|
||||
18 25
|
||||
19 25
|
||||
1a 25
|
||||
1b 25
|
||||
1c 25
|
||||
1d 26
|
||||
1e 26
|
||||
1f 26
|
||||
20 26
|
||||
21 26
|
||||
22 26
|
||||
23 26
|
||||
24 26
|
||||
}
|
||||
|
||||
method 'test3 (Ljava/lang/String;)I' {
|
||||
0 33
|
||||
1 33
|
||||
2 36
|
||||
3 36
|
||||
4 36
|
||||
5 36
|
||||
6 36
|
||||
1e 37
|
||||
1f 37
|
||||
20 38
|
||||
21 39
|
||||
22 39
|
||||
23 39
|
||||
25 39
|
||||
26 39
|
||||
27 39
|
||||
28 39
|
||||
29 39
|
||||
2a 39
|
||||
2b 39
|
||||
2c 39
|
||||
2d 39
|
||||
47 46
|
||||
48 46
|
||||
49 46
|
||||
4a 41
|
||||
4b 41
|
||||
4c 41
|
||||
4d 41
|
||||
4e 41
|
||||
4f 41
|
||||
50 41
|
||||
51 41
|
||||
52 42
|
||||
53 42
|
||||
54 42
|
||||
55 42
|
||||
56 42
|
||||
57 42
|
||||
58 43
|
||||
59 43
|
||||
5a 43
|
||||
5b 43
|
||||
5c 43
|
||||
5d 43
|
||||
5e 43
|
||||
5f 43
|
||||
60 46
|
||||
61 46
|
||||
62 46
|
||||
63 46
|
||||
64 46
|
||||
65 46
|
||||
66 46
|
||||
}
|
||||
|
||||
method 'test4 (Ljava/lang/String;)I' {
|
||||
0 51
|
||||
1 51
|
||||
2 51
|
||||
3 51
|
||||
4 51
|
||||
1c 52
|
||||
1d 52
|
||||
1e 53
|
||||
1f 54
|
||||
20 54
|
||||
21 54
|
||||
23 54
|
||||
24 54
|
||||
25 54
|
||||
26 54
|
||||
27 54
|
||||
28 54
|
||||
29 54
|
||||
2a 54
|
||||
2b 54
|
||||
45 61
|
||||
46 61
|
||||
47 61
|
||||
48 56
|
||||
49 56
|
||||
4a 56
|
||||
4b 56
|
||||
4c 57
|
||||
4d 57
|
||||
4e 57
|
||||
4f 57
|
||||
50 57
|
||||
51 57
|
||||
52 57
|
||||
53 57
|
||||
54 57
|
||||
55 57
|
||||
56 57
|
||||
57 57
|
||||
58 58
|
||||
59 58
|
||||
5a 58
|
||||
5b 58
|
||||
5c 58
|
||||
5d 58
|
||||
5e 58
|
||||
5f 58
|
||||
60 61
|
||||
61 61
|
||||
62 61
|
||||
63 61
|
||||
64 61
|
||||
65 61
|
||||
66 61
|
||||
}
|
||||
}
|
||||
|
||||
Lines mapping:
|
||||
6 <-> 5
|
||||
10 <-> 9
|
||||
11 <-> 11
|
||||
12 <-> 12
|
||||
14 <-> 14
|
||||
15 <-> 15
|
||||
16 <-> 18
|
||||
17 <-> 18
|
||||
22 <-> 24
|
||||
24 <-> 26
|
||||
25 <-> 27
|
||||
30 <-> 34
|
||||
32 <-> 37
|
||||
33 <-> 39
|
||||
34 <-> 40
|
||||
36 <-> 42
|
||||
37 <-> 43
|
||||
38 <-> 44
|
||||
39 <-> 47
|
||||
40 <-> 47
|
||||
45 <-> 52
|
||||
46 <-> 54
|
||||
47 <-> 55
|
||||
49 <-> 57
|
||||
50 <-> 58
|
||||
51 <-> 59
|
||||
52 <-> 62
|
||||
53 <-> 62
|
||||
Not mapped:
|
||||
26
|
||||
@@ -0,0 +1,57 @@
|
||||
package pkg;
|
||||
|
||||
public class TestTryCatchFinallyMismatched {
|
||||
public static void main(String[] args) {
|
||||
|
||||
}
|
||||
|
||||
public int test(String a) {
|
||||
try {
|
||||
return Integer.parseInt(a);
|
||||
} catch (Exception e) {
|
||||
System.out.println("Error" + e);
|
||||
} finally {
|
||||
System.out.println("Finally");
|
||||
System.out.println("Finally");
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public int test2(String a) {
|
||||
try {
|
||||
return Integer.parseInt(a);
|
||||
} finally {
|
||||
System.out.println("Finally");
|
||||
System.out.println("Finally");
|
||||
}
|
||||
}
|
||||
|
||||
public int test3(String a) {
|
||||
int a2 = 1;
|
||||
try {
|
||||
return Integer.parseInt(a);
|
||||
} catch (Exception e) {
|
||||
System.out.println("Error" + e);
|
||||
} finally {
|
||||
a2 = 3 + a.length();
|
||||
System.out.println("Finally");
|
||||
System.out.println("Finally");
|
||||
}
|
||||
return a2;
|
||||
}
|
||||
|
||||
public int test4(String a) {
|
||||
int a2 = 1;
|
||||
try {
|
||||
return Integer.parseInt(a);
|
||||
} catch (Exception e) {
|
||||
System.out.println("Error" + e);
|
||||
} finally {
|
||||
String test = "test";
|
||||
System.out.println("Finally" + test);
|
||||
System.out.println("Finally");
|
||||
}
|
||||
return a2;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user