mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Improve exception messages on nested jar failure
Updates gh-284
This commit is contained in:
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…
Reference in New Issue
Block a user