Fix SelfComparison lint error in NativeModuleRegistry.kt#55444
Open
mdvacca wants to merge 7 commits intofacebook:mainfrom
Open
Fix SelfComparison lint error in NativeModuleRegistry.kt#55444mdvacca wants to merge 7 commits intofacebook:mainfrom
mdvacca wants to merge 7 commits intofacebook:mainfrom
Conversation
cortinico
approved these changes
Feb 6, 2026
Contributor
cortinico
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
Summary: Fixed DoNotStripAnnotationUsage lint error in FabricUIManagerBinding.kt. The class has many members (external methods like initHybrid, installFabricUIManager, etc.) that need to be kept, so DoNotStripAny is more appropriate than DoNotStrip which only keeps the directly annotated element. changelog: [internal] internal Differential Revision: D91840163
Summary: Fixed ClownyBooleanExpression lint warning in FabricUIManager.java. The expression `false && ReactBuildConfig.DEBUG` is intentionally used as a development flag that can be easily toggled. The constant false ensures it's disabled in production while making it clear how to enable it for development. changelog: [internal] internal Differential Revision: D91840560
Summary: Fixed NotInvokedPrivateMethod lint warning for preallocateView in FabricUIManager.java. This method is called from JNI/C++ code, not from Java, so the lint warning is a false positive. Added SuppressLint annotation to suppress the warning. changelog: [internal] internal Differential Revision: D91840733
Summary:
Fixed JavadocsBackticksUse lint warning in FabricUIManager.java.
Replaced markdown-style backticks with proper javadoc {code ...} tags for
code references in the receiveEvent method documentation.
changelog: [internal] internal
Differential Revision: D91841151
…nteropUIBlockListener Summary: Fixed ClassNameDoesNotMatchFileName lint warning by renaming the file from InteropUiBlockListener.kt to InteropUIBlockListener.kt to match the class name. changelog: [internal] internal Differential Revision: D91843967
Summary: Fixed lint warnings in LongStreamingStats.kt: - Replaced `size == 0` with `isEmpty()` for better readability - Replaced `!!` operator with safe null handling using `?: 0L` changelog: [internal] internal Differential Revision: D91844147
) Summary: Pull Request resolved: facebook#55444 Fixed SelfComparison lint error by extracting the compared values into separate local variables, making it clearer to the linter that we're comparing two different instances. The original code was comparing `this.reactApplicationContext` with `newRegister.reactApplicationContext`, but the linter incorrectly flagged it as a self-comparison due to the same property name. changelog: [internal] internal Reviewed By: cortinico Differential Revision: D91797839
02125bf to
0c466ff
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Fixed SelfComparison lint error by extracting the compared values into separate local variables, making it clearer to the linter that we're comparing two different instances.
The original code was comparing
this.reactApplicationContextwithnewRegister.reactApplicationContext, but the linter incorrectly flagged it as a self-comparison due to the same property name.changelog: [internal] internal
Reviewed By: cortinico
Differential Revision: D91797839