-
-
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
Exception when deserialization of private
record with default constructor
#4175
Comments
@janpachol we have tests with records like this. I think that this is most likely down to the record being |
I created #4176 as a reproducible test case. |
Oh, you're correct, but it looks problem is not in private record, but in private constructor (when record is private, it looks that compilation creates also private constructor): This doesn't work: public record TestObject(String text) {
private TestObject {
}
} This works: private record TestObject(String text) {
public TestObject {
}
} |
private
record with default constructor
Yes, it makes sense the issue is |
… failing)" This reverts commit 3a0991c.
Cool. While I have am bit concerned about change causing some other regression, there isn't much that can be done without reproduction of such problem. |
Wrt regression, we may already have some tests against regression via 228bc0e --though indirectly covers. |
Search before asking
Describe the bug
When deserializing a record, jackson fails with
It looks like jackson does not see default constructor.
Version Information
2.16.0-rc1
Reproduction
When I add compact constructor with
@JsonCreator
to TestObject, it works correctly:Additional context
access=READ_ONLY
#4119The text was updated successfully, but these errors were encountered: