< prev index next >
src/java.base/share/classes/sun/net/www/protocol/jar/JarURLConnection.java
Print this page
*** 87,98 ****
--- 87,106 ----
jarFileURLConnection.setUseCaches(useCaches);
entryName = getEntryName();
}
public JarFile getJarFile() throws IOException {
+ try {
connect();
return jarFile;
+ } catch (IOException e) {
+ if (jarFile != null) {
+ return jarFile;
+ } else {
+ throw e;
+ }
+ }
}
public JarEntry getJarEntry() throws IOException {
connect();
return jarEntry;
< prev index next >