Skip to content

Commit

Permalink
First part of fix, for #4630
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jul 23, 2024
1 parent 8875a9c commit 509f41b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1303,8 +1303,8 @@ protected void _removeUnwantedAccessor(Map<String, POJOPropertyBuilder> props)
{
// 15-Jan-2023, tatu: Avoid pulling in mutators for Records; Fields mostly
// since there should not be setters.
final boolean inferMutators = !isRecordType()
&& _config.isEnabled(MapperFeature.INFER_PROPERTY_MUTATORS);
// 22-Jul-2024, tatu: Actually do pull them to fix [databind#4630]
final boolean inferMutators = _config.isEnabled(MapperFeature.INFER_PROPERTY_MUTATORS);
Iterator<POJOPropertyBuilder> it = props.values().iterator();

while (it.hasNext()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void add(Recursion recursion) {

// [databind#3992]
@Test
public void testHelloRecord() throws Exception {
public void testHelloRecord3992() throws Exception {
Recursion beanWithRecursion = new Recursion();
beanWithRecursion.add(beanWithRecursion);
String json = MAPPER.writer()
Expand All @@ -53,7 +53,7 @@ public void testHelloRecord() throws Exception {

// [databind#4626]
@Test
public void testDeserialize() throws Exception {
public void testDeserializeWithOverride4626() throws Exception {
HelloRecord expected = new HelloRecord("hello", null);

assertEquals(expected, MAPPER.readValue(a2q("{'text':'hello'}"), HelloRecord.class));
Expand Down

0 comments on commit 509f41b

Please sign in to comment.