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

Create Builder for KotlinModule #306

Merged
merged 4 commits into from
Mar 11, 2020
Merged

Conversation

dinomite
Copy link
Member

@dinomite dinomite commented Mar 8, 2020

We're going to be adding more settings in the future, create a Builder so the module can be easily constructed from a Java context.

#281 (comment)

@@ -14,16 +14,22 @@ class KotlinModule constructor (
val reflectionCacheSize: Int = 512,
val nullToEmptyCollection: Boolean = false,
val nullToEmptyMap: Boolean = false,
val nullisSameAsDefault: Boolean = false
val nullIsSameAsDefault: Boolean = false
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed the camelCasing on this property.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good, thanks.

import org.junit.Assert.*
import org.junit.Test

class KotlinModuleTest {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test because mis-wiring one of these booleans would be easy to do.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea as well.

@dinomite
Copy link
Member Author

dinomite commented Mar 8, 2020

Hmm, I'm a bit confused by those test failures. The head commit on 2.11 passed on Travis, but fails in the same way as this PR when I run it locally.

@dinomite
Copy link
Member Author

dinomite commented Mar 8, 2020

Fixed—jackson-databind changed the default representation of TZ offsets in FasterXML/jackson-databind#2643

@dinomite dinomite mentioned this pull request Mar 8, 2020
@cowtowncoder
Copy link
Member

Ah yes, thank you for addressing the date/time formatting change: did not realize it but yes that would cause test fails.

This is one reason why I think a release candidate (at least one) is needed for 2.11, since this is one change that could result in both real problems and failures for tests that check for exact string.

@cowtowncoder cowtowncoder merged commit 8af1734 into FasterXML:2.11 Mar 11, 2020
@dinomite dinomite deleted the module-builder branch March 11, 2020 18:13
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.

2 participants