Improve exception messages on nested jar failure

Updates gh-284
pull/272/merge
Phillip Webb 11 years ago
parent 14bc06a387
commit 3e7af3ddb8

@ -305,10 +305,16 @@ public class JarFile extends java.util.jar.JarFile implements Iterable<JarEntryD
*/
public synchronized JarFile getNestedJarFile(final JarEntryData sourceEntry,
JarEntryFilter... filters) throws IOException {
if (sourceEntry.isDirectory()) {
return getNestedJarFileFromDirectoryEntry(sourceEntry, filters);
try {
if (sourceEntry.isDirectory()) {
return getNestedJarFileFromDirectoryEntry(sourceEntry, filters);
}
return getNestedJarFileFromFileEntry(sourceEntry, filters);
}
catch (IOException ex) {
throw new IOException("Unable to open nested jar file '"
+ sourceEntry.getName() + "'", ex);
}
return getNestedJarFileFromFileEntry(sourceEntry, filters);
}
private JarFile getNestedJarFileFromDirectoryEntry(JarEntryData sourceEntry,

Loading…
Cancel
Save