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

Make generated Jackson serializers to work with null values of boxed types #43146

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

mariofusco
Copy link
Contributor

As mentioned here, merging this commit actually unveiled a couple of defects in the generated Jackson serializers:

  1. The getter method of a boolean field should start with "is" only when using the primitive type boolean, but not with the corresponding boxed type java.lang.Boolean. Fixed here.
  2. When the Java object to be serialized has a boxed type field, the value of the field is automatically unboxed during the serialization, but of course this fails when the value is null, so it has to be guarded by a null check. Fixed here.

@quarkus-bot quarkus-bot bot added the area/rest label Sep 9, 2024
Copy link

quarkus-bot bot commented Sep 9, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit acb52a9.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

@gsmet gsmet merged commit 31f54d8 into quarkusio:main Sep 9, 2024
32 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.16 - main milestone Sep 9, 2024
@gsmet
Copy link
Member

gsmet commented Sep 9, 2024

@mariofusco could you also prepare a PR targeting 3.14? I suppose we need this fix in 3.14 too, right?

@mariofusco
Copy link
Contributor Author

@mariofusco could you also prepare a PR targeting 3.14? I suppose we need this fix in 3.14 too, right?

Sure, I will immediately.

@mariofusco mariofusco deleted the q43104 branch September 9, 2024 16:33
@gsmet
Copy link
Member

gsmet commented Sep 9, 2024

Thanks!

@mariofusco
Copy link
Contributor Author

@gsmet see #43157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants