Fixed
Status Update
Comments
il...@google.com <il...@google.com>
ap...@google.com <ap...@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: 1.0.0-rc01
I recently worked on an app with package name 'in.bitotsav', and used navigation architecture component to implement a single activity structure. I had been using safeargs using
apply plugin: "androidx.navigation.safeargs"
But just now, I discovered the availability of "androidx.navigation.safeargs.kotlin", so I tried applying it. But it leads to compilation error due to the 'in' part of the package name not being escaped in the generated code, for statements like:
override fun getActionId(): Int = in.bitotsav.R.id.action_global_destEventDetail
and
fun actionDestLoginToDestRegistration(): NavDirections =
ActionOnlyNavDirections(in.bitotsav.R.id.action_destLogin_to_destRegistration)
This can be fixed if the 'in' is escaped with backticks, as:
override fun getActionId(): Int = `in`.bitotsav.R.id.action_global_destEventDetail
This is also what is done by android studio in imports.
Version Info:
minSdkVersion 21
targetSdkVersion 28
Android Studio 3.5 Canary 3
Build #AI-183.5153.38.35.5256920, built on January 24, 2019
JRE: 1.8.0_152-release-1248-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.20.8-arch1-1-ARCH