Skip to content

Commit

Permalink
don't swallow Exception when reading jarFile
Browse files Browse the repository at this point in the history
assuming this code is leftover from initial hacking but can't see why we
would want to ignore an inability to read a jarfile.
  • Loading branch information
mattnworb committed Jul 22, 2015
1 parent 9a6b9c6 commit 7d1df5a
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,8 @@ private Artifact loadFromJar(ArtifactName artifactName, File path) {
while (entries.hasMoreElements()) {
JarEntry entry = entries.nextElement();
if (entry.getName().endsWith(".class")) {
try {
DeclaredClass cl = new ClassLoader(jarFile.getInputStream(entry)).load();
classes.put(cl.className(), cl);
} catch (Exception e) {
System.err.println("Could not load " + entry.getName() + " from " + path);
}
DeclaredClass cl = new ClassLoader(jarFile.getInputStream(entry)).load();
classes.put(cl.className(), cl);
}
}
return artifact(artifactName, classes);
Expand Down

0 comments on commit 7d1df5a

Please sign in to comment.