Skip to content

Commit 0d54fe6

Browse files
authored
Merge pull request #869 from k163377/entries
Replaced Enum.values with Enum.entries
2 parents d94e3d9 + 898ee9e commit 0d54fe6

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

release-notes/CREDITS-2.x

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ WrongWrong (@k163377)
2828
# 2.18.0 (26-Sep-2024)
2929

3030
WrongWrong (@k163377)
31+
* #869: Replaced Enum.values with Enum.entries
3132
* #818: Optimize the search process for creators
3233
* #817: Fixed nullability of convertValue function argument
3334
* #782: Organize deprecated contents

release-notes/VERSION-2.x

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Co-maintainers:
1818

1919
2.19.0 (not yet released)
2020

21+
#869: By using Enum.entries in the acquisition of KotlinFeature.defaults, the initialization load was reduced, albeit slightly.
2122
#861: Kotlin has been upgraded to 1.9.24.
2223
#858: Minor performance improvement of findDefaultCreator in edge cases.
2324
#839: Remove useKotlinPropertyNameForGetter and unify with kotlinPropertyNameAsImplicitName.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ enum class KotlinFeature(internal val enabledByDefault: Boolean) {
7272

7373
companion object {
7474
internal val defaults
75-
get() = values().fold(BitSet(Int.SIZE_BITS)) { acc, cur ->
75+
get() = entries.fold(BitSet(Int.SIZE_BITS)) { acc, cur ->
7676
acc.apply { if (cur.enabledByDefault) this.or(cur.bitSet) }
7777
}
7878
}

0 commit comments

Comments
 (0)