https://issues.apache.org/bugzilla/show_bug.cgi?id=46752

           Summary: AntClassLoader.getResources unimplemented
           Product: Ant
           Version: 1.7.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: [email protected]
        ReportedBy: [email protected]


While getResource is overridden to search ACL.parent (see bug #749),
getResources is not. Therefore it uses CL.getResources, which uses CL.parent,
which in the case of ACL is arbitrarily initialized to
CL.getSystemClassLoader(). Therefore an ACL whose ACL.parent cannot "see" some
resource, and whose pathComponents does not contain it, will nonetheless return
it from getResources if that resource can be found in the application
classpath.

This is bad because, for example, ServiceLoader calls
getResources("META-INF/services/....") and tries to load all the classes it
finds using the same loader. If the configured loader is an ACL (or a child of
one) which is not parented to the app CP, and the app CP defines some services,
then a ServiceConfigurationError will result. See:
http://www.netbeans.org/nonav/issues/show_bug.cgi?id=158934

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to