changeset 4319:0b1354ecf5a3

7040150: Indexing Error in CachedRowSetImpl.removeCurrentRow Reviewed-by: smarks
author lancea
date Fri, 29 Apr 2011 09:04:03 -0400
parents 94d02b3c5ac4
children 24ad188dc46c
files src/share/classes/com/sun/rowset/CachedRowSetImpl.java
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/rowset/CachedRowSetImpl.java	Thu Apr 28 20:48:36 2011 -0700
+++ b/src/share/classes/com/sun/rowset/CachedRowSetImpl.java	Fri Apr 29 09:04:03 2011 -0400
@@ -1666,7 +1666,7 @@
      */
     protected void removeCurrentRow() {
         ((Row)getCurrentRow()).setDeleted();
-        rvh.remove(cursorPos);
+        rvh.remove(cursorPos - 1);
         --numRows;
     }
 
@@ -6349,7 +6349,6 @@
         // this can happen if deleted rows are being shown
         if (row.getDeleted() == true) {
             removeCurrentRow();
-            --numRows;
         }
     }