Fix crash due to missing @JvmStatic to convertToCase

Summary:
Users are reporting that RN 0.75 is crashing due to us attempting to accessing a static method
on `AndroidUnicodeUtils.convertToCase` which is not static anymore due to Kotlin conversion.

Static access is inside Hermes codebase here:
https://github.com/facebook/hermes/blob/f5c867514c71b25212eb3039230e0c095518b532/lib/Platform/Unicode/PlatformUnicodeJava.cpp#L107-L109

Changelog:
[Android] [Fixed] - Fix crash due to missing JvmStatic to `convertToCase`

Reviewed By: javache

Differential Revision: D59218291

fbshipit-source-id: ac121a8bcd5fd917ee134d257f967c8e3e338ca5
This commit is contained in:
Nicola Corti
2024-07-01 03:32:14 -07:00
committed by Facebook GitHub Bot
parent c7988c9c82
commit cef17ba14f
@@ -39,6 +39,7 @@ public object AndroidUnicodeUtils {
}
@DoNotStrip
@JvmStatic
public fun convertToCase(input: String, targetCase: Int, useCurrentLocale: Boolean): String {
// Note Java's case conversions use the user's locale. For example "I".toLowerCase()
// will produce a dotless i. From Java's docs: "To obtain correct results for locale