in src/main/java/org/apache/sling/feature/io/IOUtils.java [230:251]
public static JarFile getJarFileFromURL(URL url, boolean cache, File tmpDir) throws IOException {
try {
URL targetURL = url;
if (!url.getProtocol().equals("jar")) {
targetURL = new URL("jar:" + toURLString(url) + "!/");
}
else if (!url.getPath().endsWith("!/")) {
targetURL = new URL(toURLString(url) + "!/");
}
JarURLConnection connection = (JarURLConnection) targetURL.openConnection();
connection.setUseCaches(false);
return connection.getJarFile();
} catch (IOException ex) {
File file = getFileFromURL(url, cache, tmpDir);
if (file != null) {
return new JarFile(file);
}
else {
throw ex;
}
}
}