Skip to content

Commit 2875784

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Fix HasBetterKotlinAlternativeMethod: Use Kotlin joinToString (facebook#55504)
Summary: 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
1 parent 07c45b4 commit 2875784

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTypefaceUtils.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ package com.facebook.react.views.text
99

1010
import android.content.res.AssetManager
1111
import android.graphics.Typeface
12-
import android.text.TextUtils
1312
import com.facebook.react.bridge.ReadableArray
1413
import com.facebook.react.common.ReactConstants
1514
import com.facebook.react.common.assets.ReactFontManager
@@ -93,7 +92,7 @@ public object ReactTypefaceUtils {
9392
"stylistic-twenty" -> features.add("'ss20'")
9493
}
9594
}
96-
return TextUtils.join(", ", features)
95+
return features.joinToString(", ")
9796
}
9897

9998
@JvmStatic

0 commit comments

Comments
 (0)