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

ClassFileImporter doesn't import packages, if respective Jar Entry is missing #11

Closed
codecholeric opened this issue Jun 3, 2017 · 0 comments
Labels
Milestone

Comments

@codecholeric
Copy link
Collaborator

The current implementation relies on ClassLoader#getResources("/some/pkg") to import package some.pkg. This works for most Jars, however, if the Jar doesn't contain an entry for the respective folder, getResources(..) will return an empty array, and thus classes won't be imported.

An easy way to reproduce this, is to import java.io and observe, that java.io.File will be missing. This happens, because the default rt.jar is missing the entry /java/io, but has an entry /java/io/File.class.

Obviously, this is not desired behavior, because the import of packages should not depend on whether or not the respective Jar has folder entries or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant