Skip to content

Commit

Permalink
Fix crash due to missing @JvmStatic to convertToCase
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cortinico authored and facebook-github-bot committed Jul 1, 2024
1 parent c7988c9 commit cef17ba
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cef17ba

Please sign in to comment.