mirror of
https://github.com/corda/corda.git
synced 2025-01-04 04:04:27 +00:00
Teach SystemClassLoader#getResources to not stop at the first match
The getResources method can be used to find all matches in the class path for a given path, e.g. to seek out all the META-INF/MANIFEST.MF files contained in all of the .jar files in the class path. We just taught the findResources() method to return all matches (rather than only the first), so let's use that method to get all the matches from the current class loader's class path elements. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
parent
0602d4a447
commit
167688eabd
@ -107,9 +107,9 @@ public class SystemClassLoader extends ClassLoader {
|
||||
}
|
||||
}
|
||||
|
||||
URL url = findResource(name);
|
||||
if (url != null) {
|
||||
urls.add(url);
|
||||
Enumeration<URL> urls2 = findResources(name);
|
||||
while (urls2.hasMoreElements()) {
|
||||
urls.add(urls2.nextElement());
|
||||
}
|
||||
|
||||
return Collections.enumeration(urls);
|
||||
|
Loading…
Reference in New Issue
Block a user