Fixed
Status Update
Comments
se...@google.com <se...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 66bd9aadddc4437c04cb5be280e05c22a770a308
Author: Jeremy Woods <jbwoods@google.com>
Date: Mon Jun 01 21:21:03 2020
Fix NonNullableMutableLiveData lint check
The lint check currently only accounts for local variables and either
throws an error or ignores fields completely.
This change makes the Detector consider fields as well.
We should move this entire check to using the DataFlowAnalyzer in the
future.
Test: added test
Bug: 156002218
Bug: 157294666
Change-Id: I60b746df521c1817553cd1667f50ebe717f1b711
M lifecycle/lifecycle-livedata-core-ktx-lint/build.gradle
M lifecycle/lifecycle-livedata-core-ktx-lint/src/main/java/androidx/lifecycle/lint/NonNullableMutableLiveDataDetector.kt
M lifecycle/lifecycle-livedata-core-ktx-lint/src/test/java/androidx/lifecycle/lint/NonNullableMutableLiveDataDetectorTest.kt
https://android-review.googlesource.com/1322059
Branch: androidx-master-dev
commit 66bd9aadddc4437c04cb5be280e05c22a770a308
Author: Jeremy Woods <jbwoods@google.com>
Date: Mon Jun 01 21:21:03 2020
Fix NonNullableMutableLiveData lint check
The lint check currently only accounts for local variables and either
throws an error or ignores fields completely.
This change makes the Detector consider fields as well.
We should move this entire check to using the DataFlowAnalyzer in the
future.
Test: added test
Bug: 156002218
Bug: 157294666
Change-Id: I60b746df521c1817553cd1667f50ebe717f1b711
M lifecycle/lifecycle-livedata-core-ktx-lint/build.gradle
M lifecycle/lifecycle-livedata-core-ktx-lint/src/main/java/androidx/lifecycle/lint/NonNullableMutableLiveDataDetector.kt
M lifecycle/lifecycle-livedata-core-ktx-lint/src/test/java/androidx/lifecycle/lint/NonNullableMutableLiveDataDetectorTest.kt
my...@gmail.com <my...@gmail.com> #4
il...@google.com <il...@google.com> #5
Re #4 - please file a new bug with a sample project. The link you provided is not publicly viewable.
my...@gmail.com <my...@gmail.com> #6
Re #5: Done --
The link should be accessible with any Circle CI account, sorry about that. I did not realize that they changed it.
Description
Component used: lifecycle-livedata-ktx
Version used: 2.3.0-alpha03
Devices/Android versions reproduced on: N/A
If MutableLiveData is not a private field, lint
NullSafeMutableLiveData
occurs error.Error log