Fixed
Status Update
Comments
da...@google.com <da...@google.com> #2
Hi. Thanks for reporting this. Fixed in alpha-04
ch...@googlemail.com <ch...@googlemail.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
ap...@google.com <ap...@google.com> #4
deleted
da...@google.com <da...@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: 1.2.0
When I define an entity with a protected field that only has a getter, room tries to use the getter name to assing a value to the field.
Example:
@androidx.room.Entity
public class Entity {
@PrimaryKey
protected int id;
/**
* This getter is the problem - if I @Ignore it, everything works
*/
public int getId() {
return id;
}
}
This generates the following code in the DAO:
final Entity _item;
_item = new Entity();
_item.getId = _cursor.getInt(_cursorIndexOfId);
_result.add(_item);
This of course fails to compile ("Cannot find symbol variable getId").
I have attached a project that reproduces the problem.