-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Allow configuring custom NullValueSerializer
#2905
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
Allow configuring custom NullValueSerializer
#2905
Conversation
@AnneMayor Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@AnneMayor Thank you for signing the Contributor License Agreement! |
@@ -420,7 +423,7 @@ void deserializesJavaTimeFrimBytes() { | |||
} | |||
|
|||
@Test // GH-2601 | |||
public void internalObjectMapperCustomization() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just removed according to sonarlint rules. It looks like an unnecessary keyword.
@@ -438,14 +441,34 @@ public void internalObjectMapperCustomization() { | |||
} | |||
|
|||
@Test // GH-2601 | |||
public void configureWithNullConsumerThrowsIllegalArgumentException() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just removed according to sonarlint rules. It looks like an unnecessary keyword.
I'm looking for another great solution and trying to apply it. |
28dee8e
to
cba9492
Compare
Please, review it. Thanks :) |
048b21a
to
4f5a47a
Compare
4f5a47a
to
58ef24b
Compare
Thanks for looking into this enhancement. Taking a step back from the actual thing we want to solve, we have a growing number of constructors (6 constructors already). Adding another one is weakening the design. I would suggest creating a builder that accepts That way, we can hide customization in the builder and allow further configuration options without stretching the number of constructors. Let me know whether this makes sense. |
@mp911de |
@mp911de |
c23e1b0
to
98d4062
Compare
98d4062
to
675a1ab
Compare
@@ -432,20 +436,63 @@ public void internalObjectMapperCustomization() { | |||
|
|||
assertThat(serializer.configure(configurer)).isSameAs(serializer); | |||
|
|||
verify(mockObjectMapper, times(1)).registerModule(eq(mockModule)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just removed unnecessary command.
NullValueSerializer
Thank you for your contribution. That's merged, polished, and backported now. You might be interested in the polishing commit 8357c7d that refines the builder API to accept parameter-by-parameter instead of requiring all elements upfront to ease with usage experience. Let me know if you have any questions. |
Polishing commit 8357c7d is really awsome 👍 Thank you for kind&rapid review! (I'm friend of @AnneMayor and helping her to contribute on open source 😃) |
@mp911de , |
resolved #2878