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
{{ message }}
Repository navigation
Documentation of ClassPath#getResources() is misleading #2712
Returns all resources loadable from the current class path, including the class files of all
loadable classes but excluding the "META-INF/MANIFEST.MF" file
This is not exactly true for files which has same path relative to JAR.
Eg. if I want to load files all resources named "META-INF/schema.xml" from all JAR files on classpath, it will pick only last one, due to nature of backing ImmutableSet.
It should be either mentioned in javadocs, or allow "duplicates" for example by using ImmutableList or by changing ResourceInfo#equals to consider URL instead of just resourceName;
The other alternative here, which you can see hints of in the current code, is for a single ResourceInfo instance to expose access to multiple resources. We had tried this internally for a bit but eventually backed out the one user.
Activity
cpovirk commentedon Aug 15, 2026
The other alternative here, which you can see hints of in the current code, is for a single
ResourceInfoinstance to expose access to multiple resources. We had tried this internally for a bit but eventually backed out the one user.I'm not sure what the best thing to do here is.