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

Reflection fails on non-exported classes #2

Open
tobias opened this issue Nov 22, 2016 · 3 comments
Open

Reflection fails on non-exported classes #2

tobias opened this issue Nov 22, 2016 · 3 comments

Comments

@tobias
Copy link
Owner

tobias commented Nov 22, 2016

See http://dev.clojure.org/jira/browse/CLJ-2066

@tobias
Copy link
Owner Author

tobias commented Nov 22, 2016

This currently affects data.xml (http://dev.clojure.org/jira/browse/DXML-32), but will affect general usage as well.

@AlanBateman
Copy link

AlanBateman commented Apr 13, 2017

One thing to keep in mind is that javax.xml.stream.XMLInputFactory::newInstance always had the potential to return an instance of a type that is not accessible. It could have returned an instance of a package private class for example. Using getClass() and assume it is public has always been a bit of an anti-pattern in core reflection. Here's one way that you can walk to hierarchy to find the member that is accessible:

http://mail.openjdk.java.net/pipermail/jigsaw-dev/2016-September/009357.html

@tobias
Copy link
Owner Author

tobias commented Apr 25, 2017

Unfortunately, that solution depends on java.lang.Module, which doesn't exist < java 9.

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

No branches or pull requests

2 participants