Java records don't serialize with MapperFeature.REQUIRE_SETTERS_FOR_GETTERS
since 2.16
#4678
Closed
1 task done
Search before asking
Describe the bug
When a mapper is configured with REQUIRE_SETTERS_FOR_GETTERS, nothing gets serialized for java records, even though the properties are just properties, not just getters.
Version Information
2.16.0
Reproduction
Here's a test that reproduces the issue. This test passes on 2.15.3, but starts failing from 2.16.0 onwards.
(The failure is that
{}
is returned instead of{"prop":123}
.)Expected behavior
REQUIRE_SETTERS_FOR_GETTERS shouldn't matter for java records
Additional context
I'm running JDK 17 if it matters.
The text was updated successfully, but these errors were encountered: