Skip to content

ClassGraph assumes that URLs inside URLClassLoader are all file:// #384

@chrisr3

Description

@chrisr3

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions