--- old/src/java.base/share/classes/sun/net/www/protocol/jar/JarURLConnection.java 2020-05-11 23:52:39.323393929 +0100 +++ new/src/java.base/share/classes/sun/net/www/protocol/jar/JarURLConnection.java 2020-05-11 23:52:39.214393145 +0100 @@ -89,8 +89,16 @@ } public JarFile getJarFile() throws IOException { - connect(); - return jarFile; + try { + connect(); + return jarFile; + } catch (IOException e) { + if (jarFile != null) { + return jarFile; + } else { + throw e; + } + } } public JarEntry getJarEntry() throws IOException {