mirror of
https://gitee.com/arthas/arthas.git
synced 2024-11-29 18:58:37 +08:00
Fixed 'PackageInternalsFinder.fuse' throws an exception when jar in jar is empty (#2941)
This commit is contained in:
parent
8200afb3cc
commit
6605b4abe3
@ -98,6 +98,9 @@ public class PackageInternalsFinder {
|
||||
|
||||
JarURLConnection jarConn = (JarURLConnection) packageFolderURL.openConnection();
|
||||
String rootEntryName = jarConn.getEntryName();
|
||||
|
||||
if (rootEntryName != null) {
|
||||
//可能为 null(自己没有类文件时)
|
||||
int rootEnd = rootEntryName.length() + 1;
|
||||
|
||||
Enumeration<JarEntry> entryEnum = jarConn.getJarFile().entries();
|
||||
@ -112,6 +115,7 @@ public class PackageInternalsFinder {
|
||||
result.add(new CustomJavaFileObject(binaryName, uri));
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Wasn't able to open " + packageFolderURL + " as a jar file", e);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user