We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fdc519b commit 332dbb5Copy full SHA for 332dbb5
src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinFeature.kt
@@ -44,12 +44,12 @@ enum class KotlinFeature(private val enabledByDefault: Boolean) {
44
*/
45
StrictNullChecks(enabledByDefault = false);
46
47
- internal val bitSet: BitSet = 2.0.pow(ordinal).toInt().toBitSet()
+ internal val bitSet: BitSet = (1 shl ordinal).toBitSet()
48
49
companion object {
50
internal val defaults
51
- get() = 0.toBitSet().apply {
52
- values().filter { it.enabledByDefault }.forEach { or(it.bitSet) }
+ get() = values().fold(BitSet(Int.SIZE_BITS)) { acc, cur ->
+ acc.apply { if (cur.enabledByDefault) this.or(cur.bitSet) }
53
}
54
55
0 commit comments