From 4e98f838c84862f9f7ac7184b2087f1bdf0e4fd6 Mon Sep 17 00:00:00 2001 From: Lance Andersen Date: Fri, 29 Apr 2011 09:04:03 -0400 Subject: [PATCH] 7040150: Indexing Error in CachedRowSetImpl.removeCurrentRow Reviewed-by: smarks --- jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java b/jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java index 74ac1b2bf23..8008049a751 100644 --- a/jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java +++ b/jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java @@ -1666,7 +1666,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern */ protected void removeCurrentRow() { ((Row)getCurrentRow()).setDeleted(); - rvh.remove(cursorPos); + rvh.remove(cursorPos - 1); --numRows; } @@ -6349,7 +6349,6 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern // this can happen if deleted rows are being shown if (row.getDeleted() == true) { removeCurrentRow(); - --numRows; } }