Skip to content

Commit 54dadd7

Browse files
WoLewickifacebook-github-bot
authored andcommitted
fix: add JvmStatic to all methods used in cpp (#45243)
Summary: Following-up on #45230, I added all the needed `JvmStatic` annotations for methods used in cpp code here: https://github.com/facebook/hermes/blob/f5c867514c71b25212eb3039230e0c095518b532/lib/Platform/Unicode/PlatformUnicodeJava.cpp. ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID] [FIXED] - Use `JvmStatic` annotations for all methods from `AndroidUnicodeUtils.kt` For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [ANDROID] [FIXED] - Use `JvmStatic` annotations for all methods from `AndroidUnicodeUtils.kt` Pull Request resolved: #45243 Test Plan: Try and use those methods to see that they don't crash on `cpp` side. Reviewed By: cortinico Differential Revision: D59264093 Pulled By: dmytrorykun fbshipit-source-id: 07d683ee38ea1c7d9621ad2e37d04f3d484d3200
1 parent ad3df84 commit 54dadd7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/hermes/unicode/AndroidUnicodeUtils.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ import java.util.Locale
2020
public object AndroidUnicodeUtils {
2121

2222
@DoNotStrip
23+
@JvmStatic
2324
public fun localeCompare(left: String?, right: String?): Int {
2425
val collator = Collator.getInstance()
2526
return collator.compare(left, right)
2627
}
2728

2829
@DoNotStrip
30+
@JvmStatic
2931
public fun dateFormat(unixtimeMs: Double, formatDate: Boolean, formatTime: Boolean): String {
3032
val format =
3133
when {
@@ -53,6 +55,7 @@ public object AndroidUnicodeUtils {
5355
}
5456

5557
@DoNotStrip
58+
@JvmStatic
5659
public fun normalize(input: String?, form: Int): String =
5760
when (form) {
5861
FORM_C -> Normalizer.normalize(input, Normalizer.Form.NFC)

0 commit comments

Comments
 (0)