Skip to content

Initialization of ClassPath ends with NullPointerException #2239

@display-none

Description

@display-none

An attempt to call com.google.common.reflect.ClassPath#from ends with NullPointerException on IBM WebSphere 8.5.5.5. The following snippet from com.google.common.reflect.ClassPath#getClassPathEntries causes issues:

URLClassLoader urlClassLoader = (URLClassLoader) classloader;
for (URL entry : urlClassLoader.getURLs()) {

getURLs() on com.ibm.ws.bootstrap.ExtClassLoader returns null:

    public URL[] getURLs() {
        return null;
    }

    public URL[] _getURLs() {
        return super.getURLs();
    }

It looks like IBM made this on purpose, so I guess reporting to Guava is more appropriate here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions