You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
When you want to use ServiceLoader with JarFileClassLoader it fails not founding any implementation of selected service class.
Current flow looks like this:
ServiceLoader class invokes getResources on base ClassLoader class.
This method invokes {@link org.apache.axis2.classloader.MultiParentClassLoader#findResources(String)} method.
Subsequently super.findResources(String) method is executed which is {@link java.net.URLClassLoader#findResources(String)}.
Method
{@link org.apache.axis2.classloader.JarFileClassLoader#internalfindResources} is never executed and this is the place where {@link org.apache.axis2.classloader.UrlResourceFinder} resourceFinder object is used to fetch resources. On the contrary {@link org.apache.axis2.classloader.JarFileClassLoader#getResource(String)} method is used directly when try to fetch single resource object. This gives inconsistency by returning valid object with getResource(String) method but empty Enumeration by getResources(String) method. Suggested Labels:
JarFileClassLoader, ServiceLoader, findResources, internalfindResources
Suggested Assignees:
Affected Product Version:
master branch
OS, DB, other environment details and versions:
does not matter
Steps to reproduce:
Use java.util.ClassLoader in combination with JarFileClassLoader.
Related Issues:
Suggested solution
Implement findResources method instead of internalfindResources.
The text was updated successfully, but these errors were encountered:
Description:
When you want to use ServiceLoader with JarFileClassLoader it fails not founding any implementation of selected service class.
Current flow looks like this:
Method
{@link org.apache.axis2.classloader.JarFileClassLoader#internalfindResources} is never executed and this is the place where {@link org.apache.axis2.classloader.UrlResourceFinder} resourceFinder object is used to fetch resources. On the contrary {@link org.apache.axis2.classloader.JarFileClassLoader#getResource(String)} method is used directly when try to fetch single resource object. This gives inconsistency by returning valid object with getResource(String) method but empty Enumeration by getResources(String) method.
Suggested Labels:
JarFileClassLoader, ServiceLoader, findResources, internalfindResources
Suggested Assignees:
Affected Product Version:
master branch
OS, DB, other environment details and versions:
does not matter
Steps to reproduce:
Use java.util.ClassLoader in combination with JarFileClassLoader.
Related Issues:
Suggested solution
Implement findResources method instead of internalfindResources.
The text was updated successfully, but these errors were encountered: