Skip to content

Commit

Permalink
Fix cherry pick
Browse files Browse the repository at this point in the history
  • Loading branch information
jaskarth committed Nov 24, 2021
1 parent 023a651 commit c2f33ed
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 64 deletions.
3 changes: 2 additions & 1 deletion test/org/jetbrains/java/decompiler/SingleClassesTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,8 @@ private void registerDefault() {
register(JAVA_8, "TestDoubleBraceInitializers");

register(JAVA_17, "TestImplicitlySealedEnum");

register(JAVA_8, "TestWhile1");

}

private void registerEntireClassPath() {
Expand Down
184 changes: 121 additions & 63 deletions testData/results/pkg/TestTryWithResourcesCatchJ16.dec
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ import java.io.FileNotFoundException;
import java.util.Scanner;

public class TestTryWithResourcesCatchJ16 {
public void test(File file) {
try (Scanner scanner = new Scanner(file)) {// 9
scanner.next();// 10
} catch (FileNotFoundException var7) {// 11
var7.printStackTrace();// 12
}

}// 14

public void testFunc(File file) {
try (Scanner scanner = this.create(file)) {// 17
scanner.next();// 18
} catch (FileNotFoundException var7) {// 19
var7.printStackTrace();// 20
}

}// 22

public int test1(File file) {
int i = 0;// 25

Expand Down Expand Up @@ -37,77 +55,117 @@ public class TestTryWithResourcesCatchJ16 {
}

class 'pkg/TestTryWithResourcesCatchJ16' {
method 'test (Ljava/io/File;)V' {
4 8
8 8
9 9
a 9
b 9
c 9
2a 10
2c 11
2f 14
}

method 'testFunc (Ljava/io/File;)V' {
0 17
1 17
2 17
3 17
4 17
5 17
6 18
7 18
8 18
9 18
2f 19
31 20
34 23
}

method 'test1 (Ljava/io/File;)I' {
0 8
1 8
2 11
3 11
4 11
5 11
6 11
7 11
8 11
9 14
a 14
b 14
c 14
d 14
e 14
f 15
10 15
11 15
12 15
13 15
14 15
15 15
16 17
17 17
18 17
19 17
1b 18
6d 20
6e 21
6f 21
70 21
71 21
72 21
75 24
76 24
79 25
7a 25
7b 25
7c 25
7d 25
7e 25
7f 25
83 27
84 27
85 27
86 27
87 27
8a 30
8b 30
0 26
1 26
2 29
3 29
4 29
5 29
6 29
7 29
8 29
9 32
a 32
b 32
c 32
d 32
e 32
f 33
10 33
11 33
12 33
13 33
14 33
15 33
16 35
17 35
18 35
19 35
1b 36
6d 38
6e 39
6f 39
70 39
71 39
72 39
75 42
76 42
79 43
7a 43
7b 43
7c 43
7d 43
7e 43
7f 43
83 45
84 45
85 45
86 45
87 45
8a 48
8b 48
}

method 'create (Ljava/io/File;)Ljava/util/Scanner;' {
4 34
8 34
4 52
8 52
}
}

Lines mapping:
25 <-> 9
28 <-> 12
30 <-> 15
31 <-> 18
32 <-> 19
34 <-> 21
35 <-> 22
38 <-> 25
39 <-> 26
41 <-> 28
44 <-> 31
48 <-> 35
9 <-> 9
10 <-> 10
11 <-> 11
12 <-> 12
14 <-> 15
17 <-> 18
18 <-> 19
19 <-> 20
20 <-> 21
22 <-> 24
25 <-> 27
28 <-> 30
30 <-> 33
31 <-> 36
32 <-> 37
34 <-> 39
35 <-> 40
38 <-> 43
39 <-> 44
41 <-> 46
44 <-> 49
48 <-> 53
Not mapped:
13
21
33
36

0 comments on commit c2f33ed

Please sign in to comment.