Skip to content

Replace !! operators with idiomatic Kotlin null handling (#57076)#57076

Closed
Abbondanzo wants to merge 1 commit into
react:mainfrom
Abbondanzo:export-D107525522
Closed

Replace !! operators with idiomatic Kotlin null handling (#57076)#57076
Abbondanzo wants to merge 1 commit into
react:mainfrom
Abbondanzo:export-D107525522

Conversation

@Abbondanzo

@Abbondanzo Abbondanzo commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary:

Replace all non-null assertion operators (!!) with idiomatic Kotlin alternatives following code review feedback.

Use checkNotNull() for validation, safe call operators (?.) with early returns, and local variables to eliminate repeated null assertions. Also adopt Kotlin stdlib helpers like isNullOrEmpty() and AndroidX KTX extensions (isNotEmpty(), isEmpty(), toDrawable()) for cleaner, more type-safe code.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D107525522

@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 Jun 4, 2026
@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels Jun 4, 2026
@meta-codesync

meta-codesync Bot commented Jun 4, 2026

Copy link
Copy Markdown

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

@cortinico cortinico left a comment

Copy link
Copy Markdown
Contributor

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.

Summary:

Replace all non-null assertion operators (`!!`) with idiomatic Kotlin alternatives following code review feedback.

Use `checkNotNull()` for validation, safe call operators (`?.`) with early returns, and local variables to eliminate repeated null assertions. Also adopt Kotlin stdlib helpers like `isNullOrEmpty()` and AndroidX KTX extensions (`isNotEmpty()`, `isEmpty()`, `toDrawable()`) for cleaner, more type-safe code.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D107525522
@meta-codesync meta-codesync Bot changed the title Replace !! operators with idiomatic Kotlin null handling Replace !! operators with idiomatic Kotlin null handling (#57076) Jun 5, 2026
@Abbondanzo Abbondanzo force-pushed the export-D107525522 branch from 43c0b3f to 5b8af55 Compare June 5, 2026 19:03
@meta-codesync meta-codesync Bot closed this in 3c4f571 Jun 5, 2026
@facebook-github-tools facebook-github-tools Bot added the Merged This PR has been merged. label Jun 5, 2026
@meta-codesync

meta-codesync Bot commented Jun 5, 2026

Copy link
Copy Markdown

This pull request has been merged in 3c4f571.

@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @Abbondanzo in 3c4f571

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. 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