From 414da4c07f9788c792237279051a583eb32abc9b Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Thu, 18 Jun 2020 09:56:16 +0300 Subject: [PATCH] Leave StringBuilder.append/insert with non-nullable String parameter Leave these methods as hidden in order to preserve binary compatibility. #KT-39504 --- runtime/src/main/kotlin/kotlin/text/StringBuilder.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/runtime/src/main/kotlin/kotlin/text/StringBuilder.kt b/runtime/src/main/kotlin/kotlin/text/StringBuilder.kt index d634619c542..c85f4f7b237 100644 --- a/runtime/src/main/kotlin/kotlin/text/StringBuilder.kt +++ b/runtime/src/main/kotlin/kotlin/text/StringBuilder.kt @@ -176,6 +176,9 @@ actual class StringBuilder private constructor ( return this } + @Deprecated("Provided for binary compatibility.", level = DeprecationLevel.HIDDEN) + fun append(value: String): StringBuilder = append(value) + /** * Appends the specified string [value] to this string builder and returns this instance. * @@ -338,6 +341,9 @@ actual class StringBuilder private constructor ( */ actual fun insert(index: Int, value: Any?): StringBuilder = insert(index, value.toString()) + @Deprecated("Provided for binary compatibility.", level = DeprecationLevel.HIDDEN) + fun insert(index: Int, value: String): StringBuilder = insert(index, value) + /** * Inserts the string [value] into this string builder at the specified [index] and returns this instance. *