Improve exception messages on nested jar failure

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

@ -305,11 +305,17 @@ public class JarFile extends java.util.jar.JarFile implements Iterable<JarEntryD
*/
public synchronized JarFile getNestedJarFile(final JarEntryData sourceEntry,
JarEntryFilter... filters) throws IOException {
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);
}
}
private JarFile getNestedJarFileFromDirectoryEntry(JarEntryData sourceEntry,
JarEntryFilter... filters) throws IOException {

Loading…
Cancel
Save