Fixed
Status Update
Comments
da...@google.com <da...@google.com> #2
Correction:
So, the end result is that usb_write() sometimes sends a ZLP when it doesn't need to
should be
So, the end result is that usb_write() sometimes sends a ZLP when it doesn't need to, and sometimes neglects to send a ZLP when it should
So, the end result is that usb_write() sometimes sends a ZLP when it doesn't need to
should be
So, the end result is that usb_write() sometimes sends a ZLP when it doesn't need to, and sometimes neglects to send a ZLP when it should
ap...@google.com <ap...@google.com> #3
Note that the CHECK_LE has since been replaced with HandleError(), which causes adbd to not abort...but that stowaway amessage header is being dropped all the same...and so the behavior is pretty much undefined, I imagine. I'm not sure the switch to HandleError was a good idea, since it more or less swept the real problem under the rug.
Description
Version used: 2.2.0-alpha01
Devices/Android versions reproduced on: Pixel 3 XL / Android P
I've tried to use the new awesome Target Entity feature that introduced at 2.2.0-alpha01.
But, I encountered the Room compiler error.
It seems to happen if try inserting immutable data class using @Insert(entity = ImmutableDataClass::class)
The error message says "Cannot find setter for field.". But, the generated Dao_Impl code does not use the setter methods.
Is this a Room compiler bug?
The workaround is replacing val to var.
Here is sample codes:
```
@Database(entities = [Project::class], version = 1)
abstract class TargetEntityDatabase : RoomDatabase() {
abstract fun projectDao(): ProjectDao
}
@Entity
data class Project(
@PrimaryKey
val id: Long,
val title: String,
@ColumnInfo(defaultValue = "''")
val longDescription: String
)
data class ProjectMiniApiEntity(
val id: Long,
val title: String
)
@Dao
interface ProjectDao {
@Insert(entity = Project::class)
fun insertNewProject(projectMini: ProjectMiniApiEntity)
}
```
Gradle logs:
```
> Task :app:kaptDebugKotlin FAILED
e: ProjectMiniApiEntity.java:20: error: Cannot find setter for field.
private final long id = 0L;
^
e: ProjectMiniApiEntity.java:22: error: Cannot find setter for field.
private final java.lang.String title = null;
^
```