Fixed
Status Update
Comments
wa...@gmail.com <wa...@gmail.com>
el...@google.com <el...@google.com> #2
Follow-up comment on issue: Having a nullable typearg in a list result also doesn't make sense because for now Room will never put a null value, even though there might be valid uses cases where a user wants null items in it (the LEFT JOIN case).
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 89bfa37f8884bf5abbbe34a7761b6ee455d7eb81
Author: elifbilgin <elifbilgin@google.com>
Date: Thu Dec 29 01:31:25 2022
Guarding against meaningless usage of nullable collections in DAO method return types.
Bug: 253271782
Bug: 259426907
Test: DaoProcessorTest.kt
Change-Id: I777dca93da0fb30e1712bcbd20dbf57044cdbc2a
Relnote: Guarding against meaningless usage of nullable collections in DAO method return types.
M room/room-common/api/current.txt
M room/room-common/api/public_plus_experimental_current.txt
M room/room-common/api/restricted_current.txt
M room/room-common/src/main/java/androidx/room/RoomWarnings.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Warning.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DaoProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/coroutines.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_array.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_immutable_list.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_list.kt
https://android-review.googlesource.com/2369992
Branch: androidx-main
commit 89bfa37f8884bf5abbbe34a7761b6ee455d7eb81
Author: elifbilgin <elifbilgin@google.com>
Date: Thu Dec 29 01:31:25 2022
Guarding against meaningless usage of nullable collections in DAO method return types.
Bug: 253271782
Bug: 259426907
Test: DaoProcessorTest.kt
Change-Id: I777dca93da0fb30e1712bcbd20dbf57044cdbc2a
Relnote: Guarding against meaningless usage of nullable collections in DAO method return types.
M room/room-common/api/current.txt
M room/room-common/api/public_plus_experimental_current.txt
M room/room-common/api/restricted_current.txt
M room/room-common/src/main/java/androidx/room/RoomWarnings.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Warning.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DaoProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/coroutines.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_array.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_immutable_list.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_list.kt
el...@google.com <el...@google.com>
pr...@google.com <pr...@google.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.room:room-common:2.6.0-alpha01
androidx.room:room-compiler:2.6.0-alpha01
Description
We should produce a warning in KSP that returning a nullable collection in DAO methods is meaningless because Room will instead return an empty list if no rows are returned from the query.