Fix HasBetterKotlinAlternativeMethod: Use Kotlin joinToString (#55504)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55504

Replace `TextUtils.join(", ", features)` with the idiomatic Kotlin
`features.joinToString(", ")`. This fixes the HasBetterKotlinAlternativeMethod
lint warning and removes the now-unused TextUtils import.

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D92021387

fbshipit-source-id: 38510d3c36ccaf899826f604ed4dd1e843ebe039
This commit is contained in:
David Vacca authored and meta-codesync[bot] committed 2026-02-12 23:24:00 -08:00
1 parent 78e2dc4549
commit c8b633925f
1 file changed
+1 -2
@@ -9,7 +9,6 @@ package com.facebook.react.views.text
import android.content.res.AssetManager
import android.graphics.Typeface
import android.text.TextUtils
import com.facebook.react.bridge.ReadableArray
import com.facebook.react.common.ReactConstants
import com.facebook.react.common.assets.ReactFontManager
@@ -93,7 +92,7 @@ public object ReactTypefaceUtils {
"stylistic-twenty" -> features.add("'ss20'")
}
}
return TextUtils.join(", ", features)
return features.joinToString(", ")
}
@JvmStatic