diff --git a/release-notes/CREDITS-2.x b/release-notes/CREDITS-2.x index 5013320f6..c7b7f3b42 100644 --- a/release-notes/CREDITS-2.x +++ b/release-notes/CREDITS-2.x @@ -28,6 +28,7 @@ WrongWrong (@k163377) # 2.18.0 (26-Sep-2024) WrongWrong (@k163377) +* #869: Replaced Enum.values with Enum.entries * #818: Optimize the search process for creators * #817: Fixed nullability of convertValue function argument * #782: Organize deprecated contents diff --git a/release-notes/VERSION-2.x b/release-notes/VERSION-2.x index 3cb0111eb..b7bab23f5 100644 --- a/release-notes/VERSION-2.x +++ b/release-notes/VERSION-2.x @@ -18,6 +18,7 @@ Co-maintainers: 2.19.0 (not yet released) +#869: By using Enum.entries in the acquisition of KotlinFeature.defaults, the initialization load was reduced, albeit slightly. #861: Kotlin has been upgraded to 1.9.24. #858: Minor performance improvement of findDefaultCreator in edge cases. #839: Remove useKotlinPropertyNameForGetter and unify with kotlinPropertyNameAsImplicitName. diff --git a/src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinFeature.kt b/src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinFeature.kt index bbbbbc240..52512e6d3 100644 --- a/src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinFeature.kt +++ b/src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinFeature.kt @@ -72,7 +72,7 @@ enum class KotlinFeature(internal val enabledByDefault: Boolean) { companion object { internal val defaults - get() = values().fold(BitSet(Int.SIZE_BITS)) { acc, cur -> + get() = entries.fold(BitSet(Int.SIZE_BITS)) { acc, cur -> acc.apply { if (cur.enabledByDefault) this.or(cur.bitSet) } } }