From 48893c2135d66a0de2c24acec3e7fb659ec85f7f Mon Sep 17 00:00:00 2001 From: Automerge Date: Fri, 27 Apr 2012 11:39:21 +0000 Subject: [merge from 6.7] Use equals instead of == to compare item ids (#8712). Using == will fail at least with JPAContainer as the entity provider provides the id instances and it is not guaranteed that the same instance is returned every time (e.g. if using a Long the longs represent the same number but are not the same instance) svn changeset:23655/svn branch:6.8 --- src/com/vaadin/ui/Table.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/com/vaadin/ui/Table.java b/src/com/vaadin/ui/Table.java index e605ec4f6b..7828fdb734 100644 --- a/src/com/vaadin/ui/Table.java +++ b/src/com/vaadin/ui/Table.java @@ -1819,7 +1819,7 @@ public class Table extends AbstractSelect implements Action.Container, if (index < firstIndexNotInCache && index >= pageBufferFirstIndex && pageBuffer[CELL_GENERATED_ROW][indexInOldBuffer] == null - && pageBuffer[CELL_ITEMID][indexInOldBuffer] == id) { + && id.equals(pageBuffer[CELL_ITEMID][indexInOldBuffer])) { // we already have data in our cache, // recycle it instead of fetching it via // getValue/getPropertyValue -- cgit v1.2.3