Get rid of this try/catch
This commit is contained in:
parent
6652959553
commit
4e8b0da944
@ -48,13 +48,7 @@ public class ClassGetter {
|
|||||||
String relPath = pkgname.replace('.', '/');
|
String relPath = pkgname.replace('.', '/');
|
||||||
String resPath = URLDecoder.decode(resource.getPath(), "UTF-8");
|
String resPath = URLDecoder.decode(resource.getPath(), "UTF-8");
|
||||||
String jarPath = resPath.replaceFirst("[.]jar[!].*", ".jar").replaceFirst("file:", "");
|
String jarPath = resPath.replaceFirst("[.]jar[!].*", ".jar").replaceFirst("file:", "");
|
||||||
JarFile jarFile;
|
JarFile jarFile = new JarFile(jarPath);
|
||||||
try {
|
|
||||||
jarFile = new JarFile(jarPath);
|
|
||||||
} catch (IOException e) {
|
|
||||||
throw new RuntimeException("Unexpected IOException reading JAR File '" + jarPath
|
|
||||||
+ "'. Do you have strange characters in your folders? Such as #?", e);
|
|
||||||
}
|
|
||||||
Enumeration<JarEntry> entries = jarFile.entries();
|
Enumeration<JarEntry> entries = jarFile.entries();
|
||||||
while (entries.hasMoreElements()) {
|
while (entries.hasMoreElements()) {
|
||||||
JarEntry entry = entries.nextElement();
|
JarEntry entry = entries.nextElement();
|
||||||
|
Loading…
Reference in New Issue
Block a user