Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation of ClassPath#getResources() is misleading #2712

Open
rkosegi opened this issue Jan 15, 2017 · 0 comments
Open

Documentation of ClassPath#getResources() is misleading #2712

rkosegi opened this issue Jan 15, 2017 · 0 comments
Labels
P3 package=reflect status=triaged type=api-docs Change/add API documentation type=enhancement Make an existing feature better

Comments

@rkosegi
Copy link

rkosegi commented Jan 15, 2017

Javadocs on ClassPath#getResources() reads:

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;

@ronshapiro ronshapiro assigned ronshapiro and netdpb and unassigned ronshapiro Sep 14, 2017
@cgdecker cgdecker added P3 status=triaged type=api-docs Change/add API documentation type=enhancement Make an existing feature better labels Jul 30, 2019
@netdpb netdpb removed their assignment Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 package=reflect status=triaged type=api-docs Change/add API documentation type=enhancement Make an existing feature better
Projects
None yet
Development

No branches or pull requests

4 participants