Skip to content

Convert YogaConfigJNIFinalizer and YogaNodeJNIFinalizer to Kotlin#1915

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

Convert YogaConfigJNIFinalizer and YogaNodeJNIFinalizer to Kotlin#1915
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

@vercel

vercel Bot commented Mar 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
yoga-website Ready Ready Preview, Comment Mar 10, 2026 10:17pm

Request Review

@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
…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.

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.

Reviewed By: cortinico

Differential Revision: D95872345
meta-codesync Bot pushed a commit to react/react-native that referenced this pull request Mar 11, 2026
…6021)

Summary:
X-link: react/yoga#1915

Pull Request resolved: #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
@meta-codesync meta-codesync Bot closed this in 2efbfb2 Mar 11, 2026
@meta-codesync

meta-codesync Bot commented Mar 11, 2026

Copy link
Copy Markdown

This pull request has been merged in 2efbfb2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants