|
|
@ -98,6 +98,9 @@ public class PackageInternalsFinder {
|
|
|
|
|
|
|
|
|
|
|
|
JarURLConnection jarConn = (JarURLConnection) packageFolderURL.openConnection();
|
|
|
|
JarURLConnection jarConn = (JarURLConnection) packageFolderURL.openConnection();
|
|
|
|
String rootEntryName = jarConn.getEntryName();
|
|
|
|
String rootEntryName = jarConn.getEntryName();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (rootEntryName != null) {
|
|
|
|
|
|
|
|
//可能为 null(自己没有类文件时)
|
|
|
|
int rootEnd = rootEntryName.length() + 1;
|
|
|
|
int rootEnd = rootEntryName.length() + 1;
|
|
|
|
|
|
|
|
|
|
|
|
Enumeration<JarEntry> entryEnum = jarConn.getJarFile().entries();
|
|
|
|
Enumeration<JarEntry> entryEnum = jarConn.getJarFile().entries();
|
|
|
@ -112,6 +115,7 @@ public class PackageInternalsFinder {
|
|
|
|
result.add(new CustomJavaFileObject(binaryName, uri));
|
|
|
|
result.add(new CustomJavaFileObject(binaryName, uri));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
throw new RuntimeException("Wasn't able to open " + packageFolderURL + " as a jar file", e);
|
|
|
|
throw new RuntimeException("Wasn't able to open " + packageFolderURL + " as a jar file", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|