Skip to content

Convert YogaConfigJNIFinalizer and YogaNodeJNIFinalizer to Kotlin - #56021

Closed
andrewdacenko wants to merge 1 commit into
react:mainfrom
andrewdacenko:export-D95872345
Closed

Convert YogaConfigJNIFinalizer and YogaNodeJNIFinalizer to Kotlin#56021
andrewdacenko wants to merge 1 commit into
react:mainfrom
andrewdacenko:export-D95872345

Conversation

@andrewdacenko

Copy link
Copy Markdown
Contributor

Summary:
Changelog: [Internal]

Convert the last two Java finalizer classes in the yoga package to Kotlin, continuing the React Native Kotlinification effort. Both classes are simple JNI native memory cleanup wrappers (32 and 36 lines) that extend already-Kotlin base classes.

Changes:

  • Convert YogaConfigJNIFinalizer.java.kt (ReactAndroid + xplat/yoga copies)
  • Convert YogaNodeJNIFinalizer.java.kt (ReactAndroid + xplat/yoga copies)
  • Remove super.finalize() calls (no-op in parent chain, and Object.finalize() is not directly callable from Kotlin)

The :yoga Buck target already has language = "KOTLIN" and globs both *.java and *.kt, so no build config changes are needed.

Differential Revision: D95872345

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 9, 2026
@meta-codesync

meta-codesync Bot commented Mar 9, 2026

Copy link
Copy Markdown

@andrewdacenko has exported this pull request. If you are a Meta employee, you can view the originating Diff in D95872345.

andrewdacenko added a commit to andrewdacenko/react-native that referenced this pull request Mar 10, 2026
…act#56021)

Summary:
X-link: react/yoga#1915

Pull Request resolved: react#56021

Changelog: [Internal]

Convert the last two Java finalizer classes in the yoga package to Kotlin, continuing the React Native Kotlinification effort. Both classes are simple JNI native memory cleanup wrappers (32 and 36 lines) that extend already-Kotlin base classes.

Changes:
- Convert `YogaConfigJNIFinalizer.java` → `.kt` (ReactAndroid + xplat/yoga copies)
- Convert `YogaNodeJNIFinalizer.java` → `.kt` (ReactAndroid + xplat/yoga copies)
- Remove `super.finalize()` calls (no-op in parent chain, and `Object.finalize()` is not directly callable from Kotlin)

The `:yoga` Buck target already has `language = "KOTLIN"` and globs both `*.java` and `*.kt`, so no build config changes are needed.

Differential Revision: D95872345
andrewdacenko added a commit to andrewdacenko/yoga that referenced this pull request Mar 10, 2026
…act#1915)

Summary:
Pull Request resolved: react#1915

X-link: react/react-native#56021

Changelog: [Internal]

Convert the last two Java finalizer classes in the yoga package to Kotlin, continuing the React Native Kotlinification effort. Both classes are simple JNI native memory cleanup wrappers (32 and 36 lines) that extend already-Kotlin base classes.

Changes:
- Convert `YogaConfigJNIFinalizer.java` → `.kt` (ReactAndroid + xplat/yoga copies)
- Convert `YogaNodeJNIFinalizer.java` → `.kt` (ReactAndroid + xplat/yoga copies)
- Remove `super.finalize()` calls (no-op in parent chain, and `Object.finalize()` is not directly callable from Kotlin)

The `:yoga` Buck target already has `language = "KOTLIN"` and globs both `*.java` and `*.kt`, so no build config changes are needed.

Differential Revision: D95872345
andrewdacenko added a commit to andrewdacenko/yoga that referenced this pull request Mar 10, 2026
…act#1915)

Summary:
Pull Request resolved: react#1915

X-link: react/react-native#56021

Changelog: [Internal]

Convert the last two Java finalizer classes in the yoga package to Kotlin, continuing the React Native Kotlinification effort. Both classes are simple JNI native memory cleanup wrappers (32 and 36 lines) that extend already-Kotlin base classes.

Changes:
- Convert `YogaConfigJNIFinalizer.java` → `.kt` (ReactAndroid + xplat/yoga copies)
- Convert `YogaNodeJNIFinalizer.java` → `.kt` (ReactAndroid + xplat/yoga copies)
- Remove `super.finalize()` calls (no-op in parent chain, and `Object.finalize()` is not directly callable from Kotlin)

The `:yoga` Buck target already has `language = "KOTLIN"` and globs both `*.java` and `*.kt`, so no build config changes are needed.

Differential Revision: D95872345

@cortinico cortinico left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

…act#56021)

Summary:
X-link: react/yoga#1915

Pull Request resolved: react#56021

Changelog: [Internal]

Convert the last two Java finalizer classes in the yoga package to Kotlin, continuing the React Native Kotlinification effort. Both classes are simple JNI native memory cleanup wrappers (32 and 36 lines) that extend already-Kotlin base classes.

Changes:
- Convert `YogaConfigJNIFinalizer.java` → `.kt` (ReactAndroid + xplat/yoga copies)
- Convert `YogaNodeJNIFinalizer.java` → `.kt` (ReactAndroid + xplat/yoga copies)
- Remove `super.finalize()` calls (no-op in parent chain, and `Object.finalize()` is not directly callable from Kotlin)

The `:yoga` Buck target already has `language = "KOTLIN"` and globs both `*.java` and `*.kt`, so no build config changes are needed.

Reviewed By: cortinico

Differential Revision: D95872345
@meta-codesync meta-codesync Bot closed this in 63800af Mar 11, 2026
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Mar 11, 2026
@meta-codesync

meta-codesync Bot commented Mar 11, 2026

Copy link
Copy Markdown

This pull request has been merged in 63800af.

@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @andrewdacenko in 63800af

When will my fix make it into a release? | How to file a pick request?

meta-codesync Bot pushed a commit to react/yoga that referenced this pull request Mar 11, 2026
)

Summary:
Pull Request resolved: #1915

X-link: react/react-native#56021

Changelog: [Internal]

Convert the last two Java finalizer classes in the yoga package to Kotlin, continuing the React Native Kotlinification effort. Both classes are simple JNI native memory cleanup wrappers (32 and 36 lines) that extend already-Kotlin base classes.

Changes:
- Convert `YogaConfigJNIFinalizer.java` → `.kt` (ReactAndroid + xplat/yoga copies)
- Convert `YogaNodeJNIFinalizer.java` → `.kt` (ReactAndroid + xplat/yoga copies)
- Remove `super.finalize()` calls (no-op in parent chain, and `Object.finalize()` is not directly callable from Kotlin)

The `:yoga` Buck target already has `language = "KOTLIN"` and globs both `*.java` and `*.kt`, so no build config changes are needed.

Reviewed By: cortinico

Differential Revision: D95872345

fbshipit-source-id: 371d0eee8874f3436e41d8d5ba6083ce174c0f18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants