Migrate ReactNativeHost from Java to Kotlin#56848
Open
cortinico wants to merge 2 commits into
Open
Conversation
Summary: Mechanical migration of the deprecated `NativeViewHierarchyManager` stub class from Java to Kotlin. All methods remain empty stubs — no behavioral changes. Key migration decisions: - Class marked `open` to preserve subclassability from Java/Kotlin - All non-final public/protected methods marked `open` to match Java virtual-by-default - `resolveView` and `resolveViewManager` remain `final` (matching the Java original) - `Nullable` return types converted to Kotlin nullable types (`?`) - `synchronized` methods use `Synchronized` annotation - Static initializer converted to companion object `init` block Changelog: [Internal] Differential Revision: D104999732
Summary: Mechanical migration of the deprecated `ReactNativeHost` class from Java to Kotlin. All methods retain their exact JVM signatures to preserve API compatibility. Key migration decisions: - Class remains `abstract` (implicitly open) - All non-final, non-abstract methods marked `open` to match Java virtual-by-default - `getApplication()` remains `final` (no `open`) - Methods kept as explicit `fun` (not Kotlin properties) to preserve exact JVM getter names like `getJSMainModuleName()`, `getJSBundleFile()`, `getUIManagerProvider()` - `Nullable` return types converted to Kotlin nullable types (`?`) - `synchronized` methods use `Synchronized` annotation - `Nullsafe` annotation removed (redundant in Kotlin) - Static initializer converted to companion object `init` block Changelog: [Android][Changed] - Migrate `ReactNativeHost` from Java to Kotlin (no behavioral changes) Differential Revision: D105013283
|
@cortinico has exported this pull request. If you are a Meta employee, you can view the originating Diff in D105013283. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Mechanical migration of the deprecated
ReactNativeHostclass from Java to Kotlin. All methods retain their exact JVM signatures to preserve API compatibility.Key migration decisions:
abstract(implicitly open)opento match Java virtual-by-defaultgetApplication()remainsfinal(noopen)fun(not Kotlin properties) to preserve exact JVM getter names likegetJSMainModuleName(),getJSBundleFile(),getUIManagerProvider()Nullablereturn types converted to Kotlin nullable types (?)synchronizedmethods useSynchronizedannotationNullsafeannotation removed (redundant in Kotlin)initblockChangelog:
[Android][Changed] - Migrate
ReactNativeHostfrom Java to Kotlin (no behavioral changes)Differential Revision: D105013283