-
-
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
Fail to deserialize local Records #2758
Comments
Ok. Not quite sure what would be usable heuristics on JDK 7 to figure out this specific case: inner classes that are not static are considered problematic (since they expect "hidden this parameter" to be passed). Since Jackson can not use JDK functionality for detecting Record identifying aspects, it would have to be based on something else that differs between records and non-static inner classes. As a work-around, is it possible to mark records as |
Records are implicitly static. So In
Also note that Jackson CAN deserialize a record declared inside a class, it just can not deserialize local records. |
Makes sense wrt Quick question: line 130 on which branch? Or more importantly, in which method? |
master branch. I did link the corresponding line. |
Thank you. |
Reproducer:
Jackson fails with the following error message:
It seems to identify the local record as a local class, which is incorrect according to JLS § 14.3:
The text was updated successfully, but these errors were encountered: