FasterXML / jackson-module-kotlin

Module that adds support for serialization/deserialization of Kotlin (http://kotlinlang.org) classes and data classes.
Apache License 2.0
1.12k stars 175 forks source link

Property enabledSingletonSupport - deprecated but with wrong template #784

Closed daniloglima closed 5 months ago

daniloglima commented 6 months ago

Your question

Hey, I've using KotlinModule to configure an instance with annotation #Bean (spring), and I come accross with a requested template that recomented me replace by builder

KotlinModule(
    val reflectionCacheSize: Int = 512,
    val nullToEmptyCollection: Boolean = false,
    val nullToEmptyMap: Boolean = false,
    val nullIsSameAsDefault: Boolean = false,
    val singletonSupport: SingletonSupport = DISABLED,
    val strictNullChecks: Boolean = false
)

Looking the line kotlin val singletonSupport: SingletonSupport = DISABLED using builder I can't apply "DISABLE", just true/false. My question is, this code is gonna be remove in near future or can I send a PR to update this snippet?

k163377 commented 6 months ago

The SingletonSupport class will be removed in the future and the builder will use KotlinFeature, which is what I am working on fixing. I wasn't sure which line specifically you were referring to that you reported, but I would be happy to submit a PR.

k163377 commented 5 months ago

I have checked and this message will be completely removed in 2.18. This issue will be closed.