Java's URL class is extensible via custom URLStreamHandler factories. However, ClassGraph's URLClassLoaderHandler assumes that all URLs are file:// URLs.
for (final URL url : urls) {
if (url != null) {
classpathOrder.addClasspathEntry(url.toString(), classLoader, scanSpec, log);
}
}
The more general approach would involve reading the contents using URL.openConnection() or URL.openStream(), which would reasonably return something resembling either ZipInputStream or JarInputStream.
Java's
URLclass is extensible via customURLStreamHandlerfactories. However, ClassGraph'sURLClassLoaderHandlerassumes that all URLs arefile://URLs.The more general approach would involve reading the contents using
URL.openConnection()orURL.openStream(), which would reasonably return something resembling eitherZipInputStreamorJarInputStream.