@@ -43,32 +43,11 @@ class KotlinModule private constructor(
43
43
val nullToEmptyMap : Boolean = NullToEmptyMap .enabledByDefault,
44
44
val nullIsSameAsDefault : Boolean = NullIsSameAsDefault .enabledByDefault,
45
45
val singletonSupport : Boolean = SingletonSupport .enabledByDefault,
46
- @Suppress(" DEPRECATION_ERROR" )
47
46
strictNullChecks : Boolean = StrictNullChecks .enabledByDefault,
48
47
val kotlinPropertyNameAsImplicitName : Boolean = KotlinPropertyNameAsImplicitName .enabledByDefault,
49
48
val useJavaDurationConversion : Boolean = UseJavaDurationConversion .enabledByDefault,
50
- private val newStrictNullChecks : Boolean = NewStrictNullChecks .enabledByDefault,
49
+ newStrictNullChecks : Boolean = NewStrictNullChecks .enabledByDefault,
51
50
) : SimpleModule(KotlinModule : :class.java.name, PackageVersion .VERSION ) {
52
- /*
53
- * Prior to 2.18, an older Enum called SingletonSupport was used to manage feature.
54
- * To deprecate it and replace it with singletonSupport: Boolean, the following steps are in progress.
55
- *
56
- * 1. add enabledSingletonSupport: Boolean property
57
- * 2. delete SingletonSupport class and change the property to singletonSupport: Boolean
58
- * 3. remove the enabledSingletonSupport property
59
- *
60
- * Now that 2 is complete, deprecation is in progress for 3.
61
- */
62
- @Deprecated(
63
- level = DeprecationLevel .ERROR ,
64
- message = " This property is scheduled to be removed in 2.21 or later" +
65
- " in order to unify the use of KotlinFeature." ,
66
- replaceWith = ReplaceWith (" singletonSupport" )
67
- )
68
- val enabledSingletonSupport: Boolean get() = singletonSupport
69
-
70
- private val oldStrictNullChecks: Boolean = strictNullChecks
71
-
72
51
// To reduce the amount of destructive changes, no properties will be added to the public.
73
52
val strictNullChecks: Boolean = if (strictNullChecks) {
74
53
if (newStrictNullChecks) {
@@ -113,7 +92,7 @@ class KotlinModule private constructor(
113
92
114
93
val cache = ReflectionCache (reflectionCacheSize)
115
94
116
- context.addValueInstantiators(KotlinInstantiators (cache, nullToEmptyCollection, nullToEmptyMap, nullIsSameAsDefault, oldStrictNullChecks ))
95
+ context.addValueInstantiators(KotlinInstantiators (cache, nullToEmptyCollection, nullToEmptyMap, nullIsSameAsDefault))
117
96
118
97
if (singletonSupport) {
119
98
context.addBeanDeserializerModifier(KotlinBeanDeserializerModifier )
@@ -128,7 +107,7 @@ class KotlinModule private constructor(
128
107
useJavaDurationConversion
129
108
))
130
109
context.appendAnnotationIntrospector(
131
- KotlinNamesAnnotationIntrospector (cache, newStrictNullChecks , kotlinPropertyNameAsImplicitName)
110
+ KotlinNamesAnnotationIntrospector (cache, strictNullChecks , kotlinPropertyNameAsImplicitName)
132
111
)
133
112
134
113
context.addDeserializers(KotlinDeserializers (cache, useJavaDurationConversion))
0 commit comments