File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
src/main/kotlin/com/fasterxml/jackson/module/kotlin Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ Contributors:
1818# 2 .16.0 (not yet released)
1919
2020WrongWrong (@k163377 )
21+ * #685 : Streamline default value management for KotlinFeatures
2122* #684 : Update Kotlin Version to 1.6
2223* #682 : Remove MissingKotlinParameterException and replace with MismatchedInputException
2324
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ Co-maintainers:
1818
19192.16 .0 (not yet released )
2020
21+ #685 : Streamline default value management for KotlinFeatures .
22+ This improves the initialization cost of kotlin - module a little .
2123#684 : Kotlin 1.5 has been deprecated and the minimum supported Kotlin version will be updated to 1.6.
2224#682 : Remove MissingKotlinParameterException and replace with MismatchedInputException
2325 This change removes MissingKotlinParameterException and resolves #617 .
Original file line number Diff line number Diff line change @@ -44,12 +44,12 @@ enum class KotlinFeature(private val enabledByDefault: Boolean) {
4444 */
4545 StrictNullChecks (enabledByDefault = false );
4646
47- internal val bitSet: BitSet = 2.0 .pow( ordinal).toInt( ).toBitSet()
47+ internal val bitSet: BitSet = ( 1 shl ordinal).toBitSet()
4848
4949 companion object {
5050 internal val defaults
51- get() = 0 .toBitSet ().apply {
52- values().filter { it .enabledByDefault }.forEach { or (it .bitSet) }
51+ get() = values ().fold( BitSet ( Int . SIZE_BITS )) { acc, cur ->
52+ acc. apply { if (cur .enabledByDefault) this . or (cur .bitSet) }
5353 }
5454 }
5555}
You can’t perform that action at this time.
0 commit comments