Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some @Suppress that are no longer necessary #2796

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public fun Char.Companion.serializer(): KSerializer<Char> = CharSerializer
* Returns serializer for [CharArray] with [descriptor][SerialDescriptor] of [StructureKind.LIST] kind.
* Each element of the array is serialized one by one with [Char.Companion.serializer].
*/
@Suppress("UNCHECKED_CAST")
public fun CharArraySerializer(): KSerializer<CharArray> = CharArraySerializer

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ class BasicTypesSerializationTest {
// impossible to deserialize Nothing
assertFailsWith(SerializationException::class, "'kotlin.Nothing' does not have instances") {
val inp = KeyValueInput(Parser(StringReader("42")))
@Suppress("IMPLICIT_NOTHING_TYPE_ARGUMENT_IN_RETURN_POSITION")
inp.decodeSerializableValue(NothingSerializer())
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/*
* Copyright 2017-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
@file:Suppress("INLINE_CLASSES_NOT_SUPPORTED", "SERIALIZER_NOT_FOUND")

package kotlinx.serialization.features.inline

import kotlinx.serialization.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* Copyright 2017-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

@file:Suppress("INLINE_CLASSES_NOT_SUPPORTED", "SERIALIZER_NOT_FOUND")

package kotlinx.serialization.features.inline

import kotlinx.serialization.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* Copyright 2017-2022 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")

package kotlinx.serialization.test

import kotlinx.serialization.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
* Copyright 2017-2022 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")

package kotlinx.serialization.features

import kotlinx.serialization.*
import kotlinx.serialization.builtins.serializer
import kotlinx.serialization.json.*
import kotlinx.serialization.json.internal.BATCH_SIZE
import kotlinx.serialization.modules.*
import kotlinx.serialization.test.*
import org.junit.Test
Expand All @@ -19,6 +16,7 @@ import kotlin.test.assertEquals
import kotlin.test.assertFailsWith

class JsonJvmStreamsTest {
val BATCH_SIZE = 16 * 1024 // kotlinx.serialization.json.internal.BATCH_SIZE
private val strLen = BATCH_SIZE * 2 + 42

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ private fun toHexChar(i: Int) : Char {
else (d - 10 + 'a'.code).toChar()
}

@PublishedApi
internal val ESCAPE_STRINGS: Array<String?> = arrayOfNulls<String>(93).apply {
@JsonFriendModuleApi
public val ESCAPE_STRINGS: Array<String?> = arrayOfNulls<String>(93).apply {
for (c in 0..0x1f) {
val c1 = toHexChar(c shr 12)
val c2 = toHexChar(c shr 8)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ private open class JsonTreeDecoder(
{ (currentElement(tag) as? JsonPrimitive)?.contentOrNull }
)

@Suppress("INVISIBLE_MEMBER")
override fun decodeElementIndex(descriptor: SerialDescriptor): Int {
while (position < descriptor.elementsCount) {
val name = descriptor.getTag(position++)
Expand Down