Skip to content

Commit 31019f9

Browse files
committed
Analysis: Resolve append in deprecated warning
Warning Messages: "'appendln(String?): kotlin.text.StringBuilder /* = java.lang.StringBuilder */' is deprecated. Use appendLine instead. Note that the new method always appends the line feed character '\n' regardless of the system line separator."
1 parent b8d4e45 commit 31019f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libs/processors/src/main/java/org/wordpress/android/processor/RemoteConfigCheckBuilder.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ class RemoteConfigCheckBuilder(private val remoteFeatures: List<TypeName>) {
5050
private fun buildCheckFunction(remoteFeatures: List<Pair<String, TypeName>>): CodeBlock {
5151
val stringBuilder = StringBuilder()
5252
remoteFeatures.forEach { feature ->
53-
stringBuilder.appendln("if (${feature.first}.remoteField == null) {")
53+
stringBuilder.appendLine("if (${feature.first}.remoteField == null) {")
5454
val error = " throw IllegalArgumentException(\"\"\"${feature.second} needs to define remoteField\"\"\")"
55-
stringBuilder.appendln(error)
56-
stringBuilder.appendln("}")
55+
stringBuilder.appendLine(error)
56+
stringBuilder.appendLine("}")
5757
}
5858
return CodeBlock.of(stringBuilder.toString().trimIndent())
5959
}

0 commit comments

Comments
 (0)