Fixed
Status Update
Comments
da...@google.com <da...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 3eb053061ebd600de2ce0d13994c7f227711b21e
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Tue May 28 09:54:27 2024
Fix find database impl reflection when class has no package.
Handle the Android only (not reproducible in JVM) case when a class has no package and the getPackage() call on the Class returns null.
Bug: 342097292
Test: KClassUtilTest
Change-Id: Ie04a62cb42e9d3e9a1badb4b66030851df22b01f
A room/room-runtime/src/androidInstrumentedTest/kotlin/NoPackageDatabase.kt
A room/room-runtime/src/androidInstrumentedTest/kotlin/androidx/room/util/KClassUtilTest.kt
M room/room-runtime/src/jvmAndroidMain/kotlin/androidx/room/util/KClassUtil.jvmAndroid.kt
https://android-review.googlesource.com/3106237
Branch: androidx-main
commit 3eb053061ebd600de2ce0d13994c7f227711b21e
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Tue May 28 09:54:27 2024
Fix find database impl reflection when class has no package.
Handle the Android only (not reproducible in JVM) case when a class has no package and the getPackage() call on the Class returns null.
Bug: 342097292
Test: KClassUtilTest
Change-Id: Ie04a62cb42e9d3e9a1badb4b66030851df22b01f
A room/room-runtime/src/androidInstrumentedTest/kotlin/NoPackageDatabase.kt
A room/room-runtime/src/androidInstrumentedTest/kotlin/androidx/room/util/KClassUtilTest.kt
M room/room-runtime/src/jvmAndroidMain/kotlin/androidx/room/util/KClassUtil.jvmAndroid.kt
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit f3e367fdaa8d8caf970ca7ae5158908973b14cab
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Tue Nov 20 15:30:47 2018
Don't use ignoredColumns fields when finding POJO getters and setters.
When using ignoredColumns from the @Entity annotation, the processor
was still attempting to find getters and setters for such columns.
This change makes it so that ignored fields via the ignoredColumns
behave the same as @Ignore, in which no getter nor setter are required
for such fields, the fields are also not needed as a constructor params.
Bug: 119830714
Test: ./gradlew :room:room-compiler:test \
:room:integration-tests:testapp:cC
Change-Id: Ie148b502403b73e09ac3a3328270aed0b13a3109
M room/common/src/main/java/androidx/room/Entity.java
M room/compiler/src/main/kotlin/androidx/room/processor/PojoProcessor.kt
M room/compiler/src/test/kotlin/androidx/room/processor/PojoProcessorTest.kt
https://android-review.googlesource.com/832407
https://goto.google.com/android-sha1/f3e367fdaa8d8caf970ca7ae5158908973b14cab
Branch: androidx-master-dev
commit f3e367fdaa8d8caf970ca7ae5158908973b14cab
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Tue Nov 20 15:30:47 2018
Don't use ignoredColumns fields when finding POJO getters and setters.
When using ignoredColumns from the @Entity annotation, the processor
was still attempting to find getters and setters for such columns.
This change makes it so that ignored fields via the ignoredColumns
behave the same as @Ignore, in which no getter nor setter are required
for such fields, the fields are also not needed as a constructor params.
Bug: 119830714
Test: ./gradlew :room:room-compiler:test \
:room:integration-tests:testapp:cC
Change-Id: Ie148b502403b73e09ac3a3328270aed0b13a3109
M room/common/src/main/java/androidx/room/Entity.java
M room/compiler/src/main/kotlin/androidx/room/processor/PojoProcessor.kt
M room/compiler/src/test/kotlin/androidx/room/processor/PojoProcessorTest.kt
Description
@Entity(tableName = "purchase_table", ignoredColumns = arrayOf("mParsedJson"))
class CachedPurchase(mOriginalJson: String, mSignature: String) : Purchase(mOriginalJson, mSignature) {
@PrimaryKey(autoGenerate = true)
var id: Int = 0
}
Error:
Room actually generates the correct code, but the compiler still complains about the ignored fields, i.e., "mParsedJson"