Skip to content

Clean up incorrect @VisibleForTesting annotation usages #52025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

mateoguzmana
Copy link
Collaborator

Summary:

Static code analysis reports 18 warnings for incorrect usages of the @VisibleForTesting annotation as some of the classes/functions/properties that are annotated are not used only in tests but also in other non-test files across the codebase. This PR cleans that up to fix those warnings.

Changelog:

[INTERNAL] - Clean up incorrect @VisibleForTesting annotation usages

Test Plan:

yarn test-android
yarn android

@facebook-github-bot facebook-github-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 Jun 14, 2025
@mateoguzmana mateoguzmana marked this pull request as ready for review June 15, 2025 06:08
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jun 15, 2025
@facebook-github-bot
Copy link
Contributor

@sbuggay has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@@ -35,7 +34,6 @@
* BridgeReactContext.
*/
@DeprecatedInNewArchitecture
@VisibleForTesting
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's undo this.

Instead let's

  1. Make this class Nullsafe
  2. Convert this class to Kotlin
  3. Make it internal

To be done in separate PRs if possbile

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing, this is done now in dd788c5. If you could do a pass for the nullsafe on this one would be great

@mateoguzmana mateoguzmana requested a review from cortinico June 18, 2025 19:20
@facebook-github-bot
Copy link
Contributor

@sbuggay has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jun 19, 2025
@facebook-github-bot
Copy link
Contributor

@sbuggay merged this pull request in 1d94562.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @mateoguzmana in 1d94562

When will my fix make it into a release? | How to file a pick request?

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. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants