If the same URL comes back from multiple classloaders, you may want to use a Set instead of a List to ensure uniqueness. URLs delegate uniqueness checks to the URLStreamHandler, which by default looks at the ref attribute of the URL.
I do think you need to delegate up to the parent classloader in case you come across a resource that wasn't loaded by OWB's ClassLoader. John On Sun, Jul 9, 2017 at 1:17 PM Romain Manni-Bucau <[email protected]> wrote: > Hi Mark > > Shouldnt delegate but if you add "arquillian context" we can need in some > environment to fake it. If so we can revisit our classloader config to makt > it assumed and not just a best effort exception (which came from tck needs) > > Le 9 juil. 2017 12:47, "Mark Struberg" <[email protected]> a > écrit : > > > Hi! > > > > Should the URLClassLoader#findResources really delegate back to it's > > parent? > > > > It looks like getResources() should give all the resources found for the > > CL + it's parent chain and findResources should only return the resources > > from the 'local' path of the current CL. > > Is this assumption correct? The ClassLoader JavaDoc is pretty sparse on > > this :( > > > > With delegating to the parent in findResources we essentially picked the > > resources up twice. > > > > LieGrue, > > strub >
