Skip to content

Conversation

@mdvacca
Copy link
Contributor

@mdvacca mdvacca commented Feb 11, 2026

Summary:
Fixed NotInvokedPrivateMethod lint warnings for destroyUnmountedView() and
scheduleMountItem() by adding SuppressLint annotations.

These are private methods called from C++ via JNI (Binding.cpp). The lint
tool doesn't understand JNI calls, so these are false positives.

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D91992946

@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 Feb 11, 2026
@mdvacca mdvacca force-pushed the export-D91992946 branch 2 times, most recently from 1b32b80 to 7061a6f Compare February 11, 2026 00:58
Summary:
Fixed WrongConstant lint errors in ReactTextView.java by adding
SuppressLint("WrongConstant") annotation to the recycleView() method.

The Layout.BREAK_STRATEGY_* and Layout.JUSTIFICATION_MODE_* constants
have the same values as LineBreaker.* constants, but LineBreaker is only
available on API 29+ while React Native supports API 24+. The suppression
is safe since the constant values are identical.

changelog: [internal] internal

Differential Revision: D91990247
Summary:
Fixed SetLayoutParams lint errors in ReactTextView.java by adding
SuppressLint("SetLayoutParams") annotations.

The setLayoutParams calls are intentional:
1. In recycleView(): Resetting layout params when recycling the view
2. In setText(): Workaround for Android crash when LayoutParams is null
   (see facebook#7011)

Both uses are safe because the view is about to have its layout params
set by the parent ViewGroup anyway.

changelog: [internal] internal

Differential Revision: D91990319
Summary:
Fixed ClassImplementsFinalize lint error in ReactRootView.java by adding
SuppressLint("ClassImplementsFinalize") annotation.

The finalize() method is used for memory leak detection during development.
It only performs an assertion check to warn developers when a ReactRootView
is garbage collected without being properly unmounted. Since it doesn't do
any actual cleanup (just an assertion), the typical finalize() risks
(performance degradation, deadlocks) don't apply here.

changelog: [internal] internal

Differential Revision: D91990367
Summary:
Fixed NotInvokedPrivateMethod lint warning for unregisterFromInspector() by
adding SuppressLint annotation.

This is a native method that is called from C++ via JNI (registered in
CatalystInstanceImpl.cpp). The lint tool doesn't understand JNI calls,
so this is a false positive.

changelog: [internal] internal

Differential Revision: D91991480
Summary:
Fixed NotInvokedPrivateMethod lint warnings for destroyUnmountedView() and
scheduleMountItem() by adding SuppressLint annotations.

These are private methods called from C++ via JNI (Binding.cpp). The lint
tool doesn't understand JNI calls, so these are false positives.

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D91992946
@meta-codesync
Copy link

meta-codesync bot commented Feb 11, 2026

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

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 meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants