Fixed
Status Update
Comments
il...@google.com <il...@google.com>
il...@google.com <il...@google.com>
da...@google.com <da...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
https://android-review.googlesource.com/1123258
https://goto.google.com/android-sha1/b90079595f33f58fece04026a97faa0d243acdb1
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
Description
Version used: android.arch.navigation:navigation-safe-args-gradle-plugin:1.0.0-alpha01
As the title says, the safe args plugin generates invalid code when argument names contain a period. I would argue that the plugin should generate valid code for periods. I've seen codebases that use class package names as part of the bundle key. Sanitizing the names to replace period with an underscore would allow for easier migration to the Navigation Component.
Some code samples:
```
<fragment
android:id="@+id/firstController"
android:name="com.bluelinelabs.conductor.demo.controllers.ArchNavigationDemoController"
android:label="ArchNavigationDemoController1">
<argument android:name="NavigationDemoController.index" android:defaultValue="0" app:type="integer"/>
</fragment>
```
```
public int getNavigationDemoController.index() {
return NavigationDemoController.index;
}
```
```
public static ArchNavigationDemoControllerArgs fromBundle(Bundle bundle) {
ArchNavigationDemoControllerArgs result = new ArchNavigationDemoControllerArgs();
if (bundle.containsKey("NavigationDemoController.index")) {
result.NavigationDemoController.index = bundle.getInt("NavigationDemoController.index");
}
}
```