We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b0accd commit 6684f67Copy full SHA for 6684f67
formats/json/jvmMain/src/kotlinx/serialization/json/internal/ArrayPools.kt
@@ -8,8 +8,8 @@ package kotlinx.serialization.json.internal
8
* (unlikely) problems with memory consumptions.
9
*/
10
private val MAX_CHARS_IN_POOL = runCatching {
11
- System.getProperty("kotlinx.serialization.json.pool.size").toIntOrNull()
12
-}.getOrNull() ?: 2 * 1024 * 1024
+ System.getProperty("kotlinx.serialization.json.pool.size")?.toIntOrNull()
+}.getOrNull() ?: (2 * 1024 * 1024)
13
14
internal open class CharArrayPoolBase {
15
private val arrays = ArrayDeque<CharArray>()
0 commit comments