File tree Expand file tree Collapse file tree 8 files changed +3
-14
lines changed
commonMain/src/kotlinx/serialization/builtins
commonTest/src/kotlinx/serialization
commonTest/src/kotlinx/serialization
jvmTest/src/kotlinx/serialization/features
json/commonMain/src/kotlinx/serialization/json/internal Expand file tree Collapse file tree 8 files changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,6 @@ public fun Char.Companion.serializer(): KSerializer<Char> = CharSerializer
61
61
* Returns serializer for [CharArray] with [descriptor][SerialDescriptor] of [StructureKind.LIST] kind.
62
62
* Each element of the array is serialized one by one with [Char.Companion.serializer].
63
63
*/
64
- @Suppress(" UNCHECKED_CAST" )
65
64
public fun CharArraySerializer (): KSerializer <CharArray > = CharArraySerializer
66
65
67
66
/* *
Original file line number Diff line number Diff line change @@ -198,7 +198,6 @@ class BasicTypesSerializationTest {
198
198
// impossible to deserialize Nothing
199
199
assertFailsWith(SerializationException ::class , " 'kotlin.Nothing' does not have instances" ) {
200
200
val inp = KeyValueInput (Parser (StringReader (" 42" )))
201
- @Suppress(" IMPLICIT_NOTHING_TYPE_ARGUMENT_IN_RETURN_POSITION" )
202
201
inp.decodeSerializableValue(NothingSerializer ())
203
202
}
204
203
Original file line number Diff line number Diff line change 1
1
/*
2
2
* Copyright 2017-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3
3
*/
4
- @file:Suppress(" INLINE_CLASSES_NOT_SUPPORTED" , " SERIALIZER_NOT_FOUND" )
5
-
6
4
package kotlinx.serialization.features.inline
7
5
8
6
import kotlinx.serialization.*
Original file line number Diff line number Diff line change 2
2
* Copyright 2017-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3
3
*/
4
4
5
- @file:Suppress(" INLINE_CLASSES_NOT_SUPPORTED" , " SERIALIZER_NOT_FOUND" )
6
-
7
5
package kotlinx.serialization.features.inline
8
6
9
7
import kotlinx.serialization.*
Original file line number Diff line number Diff line change 2
2
* Copyright 2017-2022 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3
3
*/
4
4
5
- @file:Suppress(" INVISIBLE_REFERENCE" , " INVISIBLE_MEMBER" )
6
-
7
5
package kotlinx.serialization.test
8
6
9
7
import kotlinx.serialization.*
Original file line number Diff line number Diff line change 2
2
* Copyright 2017-2022 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3
3
*/
4
4
5
- @file:Suppress(" INVISIBLE_REFERENCE" , " INVISIBLE_MEMBER" )
6
-
7
5
package kotlinx.serialization.features
8
6
9
7
import kotlinx.serialization.*
10
8
import kotlinx.serialization.builtins.serializer
11
9
import kotlinx.serialization.json.*
12
- import kotlinx.serialization.json.internal.BATCH_SIZE
13
10
import kotlinx.serialization.modules.*
14
11
import kotlinx.serialization.test.*
15
12
import org.junit.Test
@@ -19,6 +16,7 @@ import kotlin.test.assertEquals
19
16
import kotlin.test.assertFailsWith
20
17
21
18
class JsonJvmStreamsTest {
19
+ val BATCH_SIZE = 16 * 1024 // kotlinx.serialization.json.internal.BATCH_SIZE
22
20
private val strLen = BATCH_SIZE * 2 + 42
23
21
24
22
@Test
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ private fun toHexChar(i: Int) : Char {
12
12
else (d - 10 + ' a' .code).toChar()
13
13
}
14
14
15
- @PublishedApi
16
- internal val ESCAPE_STRINGS : Array <String ?> = arrayOfNulls<String >(93 ).apply {
15
+ @JsonFriendModuleApi
16
+ public val ESCAPE_STRINGS : Array <String ?> = arrayOfNulls<String >(93 ).apply {
17
17
for (c in 0 .. 0x1f ) {
18
18
val c1 = toHexChar(c shr 12 )
19
19
val c2 = toHexChar(c shr 8 )
Original file line number Diff line number Diff line change @@ -203,7 +203,6 @@ private open class JsonTreeDecoder(
203
203
{ (currentElement(tag) as ? JsonPrimitive )?.contentOrNull }
204
204
)
205
205
206
- @Suppress(" INVISIBLE_MEMBER" )
207
206
override fun decodeElementIndex (descriptor : SerialDescriptor ): Int {
208
207
while (position < descriptor.elementsCount) {
209
208
val name = descriptor.getTag(position++ )
You can’t perform that action at this time.
0 commit comments