-
Notifications
You must be signed in to change notification settings - Fork 950
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
[Lifecycle] [Lint] fixes b/184830263 Lint should use check reference too #161
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
1 similar comment
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
1 similar comment
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
@jbw0033 Is there anything I can add to this PR? |
...ta-core-ktx-lint/src/main/java/androidx/lifecycle/lint/NonNullableMutableLiveDataDetector.kt
Outdated
Show resolved
Hide resolved
...ore-ktx-lint/src/test/java/androidx/lifecycle/lint/NonNullableMutableLiveDataDetectorTest.kt
Outdated
Show resolved
Hide resolved
...ore-ktx-lint/src/test/java/androidx/lifecycle/lint/NonNullableMutableLiveDataDetectorTest.kt
Outdated
Show resolved
Hide resolved
...ta-core-ktx-lint/src/main/java/androidx/lifecycle/lint/NonNullableMutableLiveDataDetector.kt
Outdated
Show resolved
Hide resolved
...ore-ktx-lint/src/test/java/androidx/lifecycle/lint/NonNullableMutableLiveDataDetectorTest.kt
Outdated
Show resolved
Hide resolved
From our internal lint: lifecycle/lifecycle-livedata-core-ktx-lint/src/test/java/androidx/lifecycle/lint/NonNullableMutableLiveDataDetectorTest.kt #794 |
I deleted whitespaces. When I run |
Thank you for the pull request! |
Proposed Changes
<T : Any>
,T
can be defined null at call site. https://kotlinlang.org/docs/generics.html#upper-boundsTesting
Test: Run NonNullableMutableLiveDataDetectorTest with new edge cases.
nullLiteralFailMultipleFields
: Added type referencejustKotlinObject
: Add additional test to prevent ArrayIndexOutOfBoundsException. It is fixed in 428f0ec but not tested. It is reported here with b/184830262genericParameterDefinition
: Generics are assumed as nullable, lint should ignore.Issues Fixed
Fixes: The bug on b/184830263 being fixed
Fixes: Tests b/184830262