Skip to content
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

nullable annotations to ReadableMap, WritableMap, ReadableArray, Writable. #23329

Closed
wants to merge 2 commits into from

Conversation

dulmandakh
Copy link
Contributor

@dulmandakh dulmandakh commented Feb 7, 2019

Summary

Kotlin is getting traction and more developers write RN native modules in it. This PR adds nullable annotations to help with Kotlin null inference and improve developer experience. Also it'll help checking code quality using lint.

I skimmed through JavaOnlyMap.java, JavaOnlyArray.java, ReadableNativeArray.java, ReadableNativeMap.java, WritableNativeArray.java and WritableNativeMap.java to infer nullability.

This is breaking change to Kotlin code.

Changelog

[Android] [Changed] - Add nullable annotations to ReadableMap, WritableMap, ReadableArray, Writable.

Test Plan

CI is green, and everything works as usual.

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. Partner labels Feb 7, 2019
@pull-bot
Copy link

pull-bot commented Feb 7, 2019

Warnings
⚠️

📋 Changelog Format - Did you include a Changelog? A changelog entry has the following format: [CATEGORY] [TYPE] - Message.

Generated by 🚫 dangerJS

@dulmandakh dulmandakh changed the title [WIP] nullable annotations for ReadableMap and WritableMap [WIP] nullable annotations to ReadableMap, WritableMap, ReadableArray, Writable. Feb 7, 2019
@dulmandakh dulmandakh changed the title [WIP] nullable annotations to ReadableMap, WritableMap, ReadableArray, Writable. nullable annotations to ReadableMap, WritableMap, ReadableArray, Writable. Feb 7, 2019
Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

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

alright!

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Feb 8, 2019
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

@dulmandakh merged commit b640b6f into facebook:master.

@facebook facebook locked as resolved and limited conversation to collaborators Feb 8, 2019
@react-native-bot react-native-bot added the Merged This PR has been merged. label Feb 8, 2019
@hramos hramos removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 14, 2019
@dulmandakh dulmandakh deleted the nullable-annotations branch February 22, 2019 14:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. Merged This PR has been merged. Partner Platform: Android Android applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants