-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Jackson
IT tries to reflectively access non-registered declaredFields
of classes
#45537
Comments
/cc @Karm (native-image), @galderz (native-image), @geoand (jackson), @gsmet (jackson), @mariofusco (jackson) |
Since |
Jackson
IT tries to reflectively access declaredFields of java.util.Date
Jackson
IT tries to reflectively access non-registered declaredFields
of classes
My guess is that the issue is here: Lines 359 to 365 in 429c2d0
But from what I can see, it's a lot more than just My guess is that we probably have to reconsider the whole |
@cowtowncoder is there a chance Jackson's own Here is the full output:
|
@gsmet So, over time I have tried to limit amount of introspection to Could you file an issue on There are likely some cases where introspection is still needed ( |
@cowtowncoder My personal suggestion is to completely remove any attempt of introspection for classes belonging to |
@cowtowncoder I created FasterXML/jackson-databind#4907, thanks for the feedback! |
@mariofusco If I was writing things from scratch, no doubt it'd best to avoid introspection. My problem is that since it is there, removal is very likely to cause some breakage somewhere. Unit test suite may catch some things but if the past experience is any indication it won't catch all cases everyone has. So "just remove it" is generally a sure recipe for trouble. As to All of this is just to say that it's necessary to proceed incrementally: maybe disabling introspection works just fine. But we have had so many bugs introduced by "just doing it" kinds of changes. |
Describe the bug
Jackson
IT tries to reflectively accessdeclaredFields
,declaredMethods
, anddeclaredConstructors
of classes which are not registered for reflection.Relates to #41995
Expected behavior
All integration tests should not be accessing elements that are not explicitly registered for reflection in native mode.
Actual behavior
jackson
integration test tries to reflectively accessdeclaredFields
,declaredMethods
, anddeclaredConstructors
ofjava.util.Date
resulting in an exception when using-H:ThrowMissingRegistrationErrors=
How to Reproduce?
On another terminal
Output of
uname -a
orver
No response
Output of
java -version
No response
Mandrel or GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: