-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Reduce/eliminate introspection on java.*
classes
#4907
Comments
Hmmmh. Ok, now I remember the challenge: although there is existing mechanism to avoid annotation introspection for JDK classes (although only applied to JDK collection types), actual introspection of declared fields etc is still performed. So that'd need to be changed and it's bigger change. Preventing this traversal would also prevent use of mix-in annotations on JDK types. |
Another question: once I get to implement something, is there some tool I could use to see if access is violated? It'd be good for me to verify changes locally before asking others to check. |
Ok so just removing Is there maybe another compiler option to get warnings? Or is this with Graal processing? @gsmet I'd be happy to work a bit on this now but need to see warnings to verify calls are no longer made. |
@cowtowncoder sorry, things have been quite chaotic lately. Let me try to assemble a simple reproducer for you. |
@cowtowncoder the feedback loop is not exactly fast as it requires building a native executable but the following reproducer reproduces the issue: See the README in it for detailed instructions. Let me know if you encounter any issue. You should be able to override Jackson in the POM to point to a SNAPSHOT. |
Thank you @gsmet ! |
Ok after couple of small tweaks (figuring out dir ref to GraalVM etc), got build going. So I think this is fine. EDIT: and after building, running service with given settings does indeed report expected warnings. |
Is your feature request related to a problem? Please describe.
This is a follow-up to this discussion in the Quarkus tracker: quarkusio/quarkus#45537 (comment) .
In the Quarkus project, @zakkak is leading an effort to allow throwing exceptions when GraalVM/Mandrel tries to do reflection calls on elements that were not registered for reflection. This effort leads to all sort of discoveries and in the issue above we discovered that Jackson tries to collect information on
java.*
classes, which should probably be avoided: these classes can't be annotated with Jackson classes and they are well known so we could probably hardcode what's needed.We are having this issue with at least
AnnotatedFieldCollector
/AnnotatedMethodCollector
/AnnotatedCreatorCollector
. There might be others.Examples of this issue with stacktraces:
Describe the solution you'd like
Ideally, we should avoid dynamically resolving this information for
java.*
classes.Usage example
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: