Skip to content

Commit aa7217f

Browse files
committed
Fix for review
1 parent 5b65f56 commit aa7217f

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinFeature.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.fasterxml.jackson.module.kotlin
22

33
import java.util.BitSet
4-
import kotlin.math.pow
54

65
/**
76
* @see KotlinModule.Builder
@@ -45,9 +44,9 @@ enum class KotlinFeature(private val enabledByDefault: Boolean) {
4544
StrictNullChecks(enabledByDefault = false),
4645

4746
/**
48-
* By enabling this feature, the property name on Kotlin will be used as the getter name.
47+
* By enabling this feature, the property name on Kotlin is used as the implicit name for the getter.
4948
*
50-
* By default, the name based on the getter name on the JVM is used as the accessor name.
49+
* By default, the getter name is used during serialization.
5150
* This name may be different from the parameter/field name, in which case serialization results
5251
* may be incorrect or annotations may malfunction.
5352
* See [jackson-module-kotlin#630] for details.
@@ -57,8 +56,9 @@ enum class KotlinFeature(private val enabledByDefault: Boolean) {
5756
* On the other hand, enabling this option increases the amount of reflection processing,
5857
* which may result in performance degradation for both serialization and deserialization.
5958
* In addition, the adjustment of behavior using get:JvmName is disabled.
59+
* Note also that this feature does not apply to setters.
6060
*/
61-
UseKotlinPropertyNameForGetter(enabledByDefault = false);
61+
KotlinPropertyNameAsImplicitName(enabledByDefault = false);
6262

6363
internal val bitSet: BitSet = (1 shl ordinal).toBitSet()
6464

src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinModule.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import com.fasterxml.jackson.module.kotlin.KotlinFeature.NullIsSameAsDefault
77
import com.fasterxml.jackson.module.kotlin.KotlinFeature.NullToEmptyCollection
88
import com.fasterxml.jackson.module.kotlin.KotlinFeature.NullToEmptyMap
99
import com.fasterxml.jackson.module.kotlin.KotlinFeature.StrictNullChecks
10-
import com.fasterxml.jackson.module.kotlin.KotlinFeature.UseKotlinPropertyNameForGetter
10+
import com.fasterxml.jackson.module.kotlin.KotlinFeature.KotlinPropertyNameAsImplicitName
1111
import com.fasterxml.jackson.module.kotlin.SingletonSupport.CANONICALIZE
1212
import com.fasterxml.jackson.module.kotlin.SingletonSupport.DISABLED
1313
import java.util.*
@@ -105,7 +105,7 @@ class KotlinModule @Deprecated(
105105
else -> DISABLED
106106
},
107107
builder.isEnabled(StrictNullChecks),
108-
builder.isEnabled(UseKotlinPropertyNameForGetter)
108+
builder.isEnabled(KotlinPropertyNameAsImplicitName)
109109
)
110110

111111
companion object {

src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/Github630.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import kotlin.test.assertEquals
99

1010
class Github630 {
1111
private val mapper = ObjectMapper()
12-
.registerModule(KotlinModule.Builder().enable(KotlinFeature.UseKotlinPropertyNameForGetter).build())!!
12+
.registerModule(KotlinModule.Builder().enable(KotlinFeature.KotlinPropertyNameAsImplicitName).build())!!
1313

1414
data class Dto(
1515
// from #570, #603

0 commit comments

Comments
 (0)