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

Fix null to empty mapping for enum sets #264

Conversation

DavidRigglemanININ
Copy link
Contributor

The ideal fix here would probably be in jackson core and specifically that NullsAsEmptyProvider works with EnumSet, but it currently does not, so this is a workaround that solves the problem for now.

@cowtowncoder
Copy link
Member

@DavidRigglemanININ reporting it as a bug would help: I noticed this and created:

FasterXML/jackson-databind#2529

and null handling for EnumSet will now be improved to same level as regular Collections and Maps in 2.1.0.1

@DavidRigglemanININ
Copy link
Contributor Author

Great! Feel free then to close this PR. It seems like activity has picked up this module, but for a while, there was little activity and workarounds were necessary if the fix wasn't going to be made immediately, and I wanted to at least make my changes visible to others in case they were useful.

@apatrida
Copy link
Member

all good @DavidRigglemanININ, I think we should add a test case to show this, and make sure it is fixed in 2.10.1 from the perspective of this report.

@DavidRigglemanININ
Copy link
Contributor Author

all good @DavidRigglemanININ, I think we should add a test case to show this, and make sure it is fixed in 2.10.1 from the perspective of this report.

This PR has a test case for null to empty enum set, so feel free to use that if you want.

@cowtowncoder
Copy link
Member

@DavidRigglemanININ thank you for offering the patch -- totally understandable wrt workarounds.

@DavidRigglemanININ
Copy link
Contributor Author

Assuming this is shown to work in 2.10.1 without my patch, we can close out this PR if you want.

@cowtowncoder
Copy link
Member

I think problem has been fixed, but if I was mistaken, please re-file issue for Kotlin module and it can be re-investigated.

@DavidRigglemanININ
Copy link
Contributor Author

I confirmed the problem is fixed in 2.10.1 of the jackson-module-kotlin without my fix.

@cowtowncoder
Copy link
Member

@DavidRigglemanININ thank you for verification.

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

Successfully merging this pull request may close these issues.

3 participants