Skip to content
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

Try to fix #4626, #4630 (start with failing tests) #4635

Merged
merged 7 commits into from
Jul 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
First part of fix, for #4630
  • Loading branch information
cowtowncoder committed Jul 23, 2024
commit 509f41bdf5d94eb8f0f194ec6fef3321352d8dd4
Original file line number Diff line number Diff line change
@@ -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()) {
Original file line number Diff line number Diff line change
@@ -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()
@@ -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));
Loading