@@ -2,9 +2,12 @@ package pkg;
22
33import java.io.File;
44import java.io.FileNotFoundException;
5+ import java.nio.file.Files;
6+ import java.nio.file.LinkOption;
57import java.nio.file.Path;
68import java.util.Iterator;
79import java.util.Scanner;
10+ import java.util.ServiceConfigurationError;
811
912public class TestTryLoop {
1013 private boolean field;
@@ -20,54 +23,91 @@ public class TestTryLoop {
2023
2124 }// 22
2225
23- public boolean hasNext(Path param1, Iterator<File> param2) {
24- // $FF: Couldn't be decompiled
25- // Bytecode:
26- // 00: aload 1
27- // 01: bipush 0
28- // 02: anewarray 7
29- // 05: invokestatic java/nio/file/Files.exists (Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
30- // 08: ifeq 17
31- // 0b: aload 2
32- // 0c: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
33- // 11: checkcast java/io/File
34- // 14: astore 3
35- // 15: bipush 1
36- // 16: ireturn
37- // 17: bipush 0
38- // 18: ireturn
39- // 19: astore 4
40- // 1b: getstatic java/lang/System.out Ljava/io/PrintStream;
41- // 1e: bipush 1
42- // 1f: invokevirtual java/io/PrintStream.println (I)V
43- // 22: goto 00
44- // 25: astore 4
45- // 27: getstatic java/lang/System.out Ljava/io/PrintStream;
46- // 2a: bipush 2
47- // 2b: invokevirtual java/io/PrintStream.println (I)V
48- // 2e: goto 00
26+ public boolean hasNext(Path p, Iterator<File> f) {
27+ while(true) {
28+ try {
29+ if (Files.exists(p, new LinkOption[0])) {// 28
30+ File a = (File)f.next();// 29
31+ return true;// 30
32+ }
33+
34+ return false;// 32
35+ } catch (ServiceConfigurationError var5) {// 33
36+ System.out.println(1);// 34
37+ } catch (NoClassDefFoundError var6) {// 35
38+ System.out.println(2);// 36
39+ }
40+ }
4941 }
5042}
5143
5244class 'pkg/TestTryLoop' {
5345 method 'test (Ljava/io/File;)V' {
54- 0 13
55- 1 13
56- 2 13
57- 3 13
58- b 14
59- 16 16
60- 18 17
61- 1b 20
46+ 0 16
47+ 1 16
48+ 2 16
49+ 3 16
50+ b 17
51+ 16 19
52+ 18 20
53+ 1b 23
54+ }
55+
56+ method 'hasNext (Ljava/nio/file/Path;Ljava/util/Iterator;)Z' {
57+ 0 28
58+ 1 28
59+ 5 28
60+ 6 28
61+ 7 28
62+ 8 28
63+ b 29
64+ c 29
65+ d 29
66+ e 29
67+ f 29
68+ 10 29
69+ 11 29
70+ 12 29
71+ 13 29
72+ 14 29
73+ 15 30
74+ 16 30
75+ 17 33
76+ 18 33
77+ 19 34
78+ 1b 35
79+ 1c 35
80+ 1d 35
81+ 1e 35
82+ 1f 35
83+ 20 35
84+ 21 35
85+ 25 36
86+ 27 37
87+ 28 37
88+ 29 37
89+ 2a 37
90+ 2b 37
91+ 2c 37
92+ 2d 37
6293 }
6394}
6495
6596Lines mapping:
66- 16 <-> 14
67- 17 <-> 15
68- 19 <-> 17
69- 20 <-> 18
70- 22 <-> 21
97+ 16 <-> 17
98+ 17 <-> 18
99+ 19 <-> 20
100+ 20 <-> 21
101+ 22 <-> 24
102+ 28 <-> 29
103+ 29 <-> 30
104+ 30 <-> 31
105+ 32 <-> 34
106+ 33 <-> 35
107+ 34 <-> 36
108+ 35 <-> 37
109+ 36 <-> 38
71110Not mapped:
7211118
7311221
113+ 37
0 commit comments