Skip to content

Commit bac628f

Browse files
cortinicometa-codesync[bot]
authored andcommitted
Migrate YogaNodeJNIBase.java to Kotlin (facebook#1939)
Summary: Pull Request resolved: facebook#1939 X-link: facebook/react-native#56780 Migrate YogaNodeJNIBase.java to YogaNodeJNIBase.kt, the last hand-written Java source file in the Yoga core library. This required converting all function overrides to Kotlin property overrides where the abstract YogaNode class declares them as val/var properties. Also changed nativePointer visibility in YogaConfigJNIBase from protected to internal to maintain same-module access that Java protected provided via package access. Changelog: [Internal] - Differential Revision: D104666335
1 parent 70a7106 commit bac628f

5 files changed

Lines changed: 732 additions & 936 deletions

File tree

java/com/facebook/yoga/YogaNode.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ public abstract class YogaNode : YogaProps {
226226

227227
public abstract val layoutDirection: YogaDirection
228228

229-
abstract override fun setMeasureFunction(measureFunction: YogaMeasureFunction)
229+
abstract override fun setMeasureFunction(measureFunction: YogaMeasureFunction?)
230230

231-
abstract override fun setBaselineFunction(yogaBaselineFunction: YogaBaselineFunction)
231+
abstract override fun setBaselineFunction(yogaBaselineFunction: YogaBaselineFunction?)
232232

233233
public abstract val isMeasureDefined: Boolean
234234

0 commit comments

Comments
 (0)