From 4acb6b03ba0bd28cdf5997ba2e784f535cf69626 Mon Sep 17 00:00:00 2001 From: lancea Date: Fri, 29 Apr 2011 09:04:03 -0400 Subject: [PATCH] 7040150: Indexing Error in CachedRowSetImpl.removeCurrentRow Reviewed-by: smarks --- src/share/classes/com/sun/rowset/CachedRowSetImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/share/classes/com/sun/rowset/CachedRowSetImpl.java b/src/share/classes/com/sun/rowset/CachedRowSetImpl.java index 74ac1b2bf..8008049a7 100644 --- a/src/share/classes/com/sun/rowset/CachedRowSetImpl.java +++ b/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; } } -- GitLab