6983452: SyncProvider issue for JoinRowSet implementation
authorlancea
Fri, 17 Sep 2010 13:23:33 -0400
changeset 6664 979f457afd3a
parent 6546 0ab9777645b5
child 6665 dcdc89306375
6983452: SyncProvider issue for JoinRowSet implementation Reviewed-by: darcy, ohair
jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java
--- a/jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java	Thu Sep 16 13:25:20 2010 +0200
+++ b/jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java	Fri Sep 17 13:23:33 2010 -0400
@@ -889,7 +889,12 @@
                     success = false;
                 } else {
                     tWriter = (TransactionalWriter)rowSetWriter;
-                    ((CachedRowSetWriter)tWriter).commit(this, updateOnInsert);
+                    if (tWriter instanceof CachedRowSetWriter) {
+                        ((CachedRowSetWriter)tWriter).commit(this, updateOnInsert);
+                    } else {
+                        tWriter.commit();
+                    }
+
                     success = true;
                 }
             }