Fixed
Status Update
Comments
ma...@mark43.com <ma...@mark43.com> #2
Comment has been deleted.
el...@google.com <el...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug: b/264018028
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
https://android-review.googlesource.com/2373449
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug:
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
el...@google.com <el...@google.com>
ap...@google.com <ap...@google.com> #4
deleted
pr...@google.com <pr...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.tv:tv-material:1.0.0-alpha04
Description
Version used:"2.6.0-rc01"
Devices/Android versions reproduced on: Not related
Kotlin implementation of DAO for @RawQuery function implementation with return type Double is initailised with 0 instead of 0.0 on null check.
@Entity
class Test(@PrimaryKey val d: Double, val l: Long) {
@Dao
interface TestDao {
@RawQuery
fun getLocation(query: SupportSQLiteQuery): Test
}
}
For this setup Room generates the following implementation:
private fun __entityCursorConverter_comTest(cursor: Cursor): Test {
val _entity: Test
val _cursorIndexOfD: Int = getColumnIndex(cursor, "d")
val _cursorIndexOfL: Int = getColumnIndex(cursor, "l")
val _tmpD: Double
if (_cursorIndexOfD == -1) {
_tmpD = 0 //Error: The integer literal does not conform to the expected type Double
} else {
_tmpD = cursor.getDouble(_cursorIndexOfD)
}
val _tmpL: Long
if (_cursorIndexOfL == -1) {
_tmpL = 0
} else {
_tmpL = cursor.getLong(_cursorIndexOfL)
}
_entity = Test(_tmpD,_tmpL)
return _entity
}