Skip to content

Fix MissingOverrideAnnotation: Add @Override to YogaNodeJNIBase methods (#56040)#56040

Closed
mdvacca wants to merge 2 commits intofacebook:mainfrom
mdvacca:export-D95413075
Closed

Fix MissingOverrideAnnotation: Add @Override to YogaNodeJNIBase methods (#56040)#56040
mdvacca wants to merge 2 commits intofacebook:mainfrom
mdvacca:export-D95413075

Conversation

@mdvacca
Copy link
Copy Markdown
Contributor

@mdvacca mdvacca commented Mar 10, 2026

Summary:

Fixed 101 MissingOverrideAnnotation lint errors in YogaNodeJNIBase.java.

Added Override annotation to all public methods that override abstract methods from the YogaNode superclass but were missing the annotation. This includes style getters/setters (direction, flex, margin, padding, border, position, width, height, min/max dimensions, aspect ratio, gap), layout methods (reset, calculateLayout, dirty), tree manipulation (addChildAt, removeChildAt, indexOf), and measurement/baseline functions.

Changelog: [Internal] internal

Reviewed By: cortinico

Differential Revision: D95413075

@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 10, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Mar 10, 2026

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

Copy link
Copy Markdown
Contributor

@cortinico cortinico left a comment

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.

mdvacca added a commit to mdvacca/yoga that referenced this pull request Mar 12, 2026
Summary:
X-link: facebook/react-native#56040

Fixed 101 MissingOverrideAnnotation lint errors in YogaNodeJNIBase.java.

Added Override annotation to all public methods that override abstract methods from the YogaNode superclass but were missing the annotation. This includes style getters/setters (direction, flex, margin, padding, border, position, width, height, min/max dimensions, aspect ratio, gap), layout methods (reset, calculateLayout, dirty), tree manipulation (addChildAt, removeChildAt, indexOf), and measurement/baseline functions.

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D95413075
mdvacca added a commit to mdvacca/react-native that referenced this pull request Mar 12, 2026
…ds (facebook#56040)

Summary:

Fixed 101 MissingOverrideAnnotation lint errors in YogaNodeJNIBase.java.

Added Override annotation to all public methods that override abstract methods from the YogaNode superclass but were missing the annotation. This includes style getters/setters (direction, flex, margin, padding, border, position, width, height, min/max dimensions, aspect ratio, gap), layout methods (reset, calculateLayout, dirty), tree manipulation (addChildAt, removeChildAt, indexOf), and measurement/baseline functions.

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D95413075
@meta-codesync meta-codesync bot changed the title Fix MissingOverrideAnnotation: Add @Override to YogaNodeJNIBase methods Fix MissingOverrideAnnotation: Add @Override to YogaNodeJNIBase methods (#56040) Mar 13, 2026
mdvacca added a commit to mdvacca/react-native that referenced this pull request Mar 13, 2026
…ds (facebook#56040)

Summary:

Fixed 101 MissingOverrideAnnotation lint errors in YogaNodeJNIBase.java.

Added Override annotation to all public methods that override abstract methods from the YogaNode superclass but were missing the annotation. This includes style getters/setters (direction, flex, margin, padding, border, position, width, height, min/max dimensions, aspect ratio, gap), layout methods (reset, calculateLayout, dirty), tree manipulation (addChildAt, removeChildAt, indexOf), and measurement/baseline functions.

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D95413075
@mdvacca mdvacca force-pushed the export-D95413075 branch from e832257 to 55ef56f Compare April 6, 2026 16:21
mdvacca added a commit to mdvacca/react-native that referenced this pull request Apr 6, 2026
…ds (facebook#56040)

Summary:

Fixed 101 MissingOverrideAnnotation lint errors in YogaNodeJNIBase.java.

Added Override annotation to all public methods that override abstract methods from the YogaNode superclass but were missing the annotation. This includes style getters/setters (direction, flex, margin, padding, border, position, width, height, min/max dimensions, aspect ratio, gap), layout methods (reset, calculateLayout, dirty), tree manipulation (addChildAt, removeChildAt, indexOf), and measurement/baseline functions.

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D95413075
mdvacca added a commit to mdvacca/react-native that referenced this pull request Apr 6, 2026
…ds (facebook#56040)

Summary:
Pull Request resolved: facebook#56040

Fixed 101 MissingOverrideAnnotation lint errors in YogaNodeJNIBase.java.

Added Override annotation to all public methods that override abstract methods from the YogaNode superclass but were missing the annotation. This includes style getters/setters (direction, flex, margin, padding, border, position, width, height, min/max dimensions, aspect ratio, gap), layout methods (reset, calculateLayout, dirty), tree manipulation (addChildAt, removeChildAt, indexOf), and measurement/baseline functions.

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D95413075
@mdvacca mdvacca force-pushed the export-D95413075 branch from 55ef56f to 6f7562c Compare April 6, 2026 16:25
mdvacca added 2 commits April 6, 2026 10:25
…nvocation (facebook#56201)

Summary:

JavaMethodWrapper is a legacy architecture class that wraps ReactMethod-annotated
Java methods via reflection for the bridge-based NativeModule invocation path.

When ReactNativeFeatureFlags.useTurboModuleInterop is enabled (the new architecture),
this class is completely bypassed — the TurboModule interop layer uses
JavaInteropTurboModule (C++) with direct JNI invocation via
JavaTurboModule::invokeJavaMethod(), which converts JSI values to JNI arguments
directly in C++ without any Java-side reflection.

This diff:
- Deletes JavaMethodWrapper.kt (only instantiated from JavaModuleWrapper.findMethods())
- Deletes BaseJavaModuleTest.kt (test that exercised JavaMethodWrapper)
- Removes the NativeMethod interface from JavaModuleWrapper (only implemented by JavaMethodWrapper)
- Rewrites JavaModuleWrapper.findMethods() to compute method type inline without JavaMethodWrapper
- Changes JavaModuleWrapper.invoke() to throw UnsupportedOperationException
- Sets md.signature to empty string for sync methods to prevent C++ null deref

The JavaModuleWrapper class shell is kept because it is still referenced from C++ JNI
(JavaModuleWrapper.cpp) and NativeModuleRegistry. Full removal is planned as follow-up.


Changelog: [Internal] internal

Reviewed By: cortinico, javache

Differential Revision: D97387121
…ds (facebook#56040)

Summary:

Fixed 101 MissingOverrideAnnotation lint errors in YogaNodeJNIBase.java.

Added Override annotation to all public methods that override abstract methods from the YogaNode superclass but were missing the annotation. This includes style getters/setters (direction, flex, margin, padding, border, position, width, height, min/max dimensions, aspect ratio, gap), layout methods (reset, calculateLayout, dirty), tree manipulation (addChildAt, removeChildAt, indexOf), and measurement/baseline functions.

Changelog: [Internal] internal

Reviewed By: cortinico

Differential Revision: D95413075
@mdvacca mdvacca force-pushed the export-D95413075 branch from 6f7562c to e52d25f Compare April 6, 2026 17:26
mdvacca added a commit to mdvacca/yoga that referenced this pull request Apr 6, 2026
Summary:
X-link: facebook/react-native#56040

Fixed 101 MissingOverrideAnnotation lint errors in YogaNodeJNIBase.java.

Added Override annotation to all public methods that override abstract methods from the YogaNode superclass but were missing the annotation. This includes style getters/setters (direction, flex, margin, padding, border, position, width, height, min/max dimensions, aspect ratio, gap), layout methods (reset, calculateLayout, dirty), tree manipulation (addChildAt, removeChildAt, indexOf), and measurement/baseline functions.

Changelog: [Internal] internal

Reviewed By: cortinico

Differential Revision: D95413075
mdvacca added a commit to mdvacca/yoga that referenced this pull request Apr 6, 2026
Summary:
X-link: facebook/react-native#56040

Fixed 101 MissingOverrideAnnotation lint errors in YogaNodeJNIBase.java.

Added Override annotation to all public methods that override abstract methods from the YogaNode superclass but were missing the annotation. This includes style getters/setters (direction, flex, margin, padding, border, position, width, height, min/max dimensions, aspect ratio, gap), layout methods (reset, calculateLayout, dirty), tree manipulation (addChildAt, removeChildAt, indexOf), and measurement/baseline functions.

Changelog: [Internal] internal

Reviewed By: cortinico

Differential Revision: D95413075
mdvacca added a commit to mdvacca/yoga that referenced this pull request Apr 6, 2026
…ds (facebook#1918)

Summary:
Pull Request resolved: facebook#1918

X-link: facebook/react-native#56040

Fixed 101 MissingOverrideAnnotation lint errors in YogaNodeJNIBase.java.

Added Override annotation to all public methods that override abstract methods from the YogaNode superclass but were missing the annotation. This includes style getters/setters (direction, flex, margin, padding, border, position, width, height, min/max dimensions, aspect ratio, gap), layout methods (reset, calculateLayout, dirty), tree manipulation (addChildAt, removeChildAt, indexOf), and measurement/baseline functions.

Changelog: [Internal] internal

Reviewed By: cortinico

Differential Revision: D95413075
@meta-codesync meta-codesync bot closed this in 23f7dc4 Apr 6, 2026
@facebook-github-tools facebook-github-tools bot added the Merged This PR has been merged. label Apr 6, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Apr 6, 2026

This pull request has been merged in 23f7dc4.

meta-codesync bot pushed a commit to facebook/yoga that referenced this pull request Apr 6, 2026
…ds (#1918)

Summary:
Pull Request resolved: #1918

X-link: facebook/react-native#56040

Fixed 101 MissingOverrideAnnotation lint errors in YogaNodeJNIBase.java.

Added Override annotation to all public methods that override abstract methods from the YogaNode superclass but were missing the annotation. This includes style getters/setters (direction, flex, margin, padding, border, position, width, height, min/max dimensions, aspect ratio, gap), layout methods (reset, calculateLayout, dirty), tree manipulation (addChildAt, removeChildAt, indexOf), and measurement/baseline functions.

Changelog: [Internal] internal

Reviewed By: cortinico

Differential Revision: D95413075

fbshipit-source-id: fc148c8aefe734c090541b6eb02815c1446d2e98
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.

3 participants