diff options
author | Eike Stepper | 2011-07-06 08:18:54 +0000 |
---|---|---|
committer | Eike Stepper | 2011-07-06 08:18:54 +0000 |
commit | 1db6ed552d142478f7df15fa798ee53d9b558088 (patch) | |
tree | 8b65da5ce41490d61619970c225ca29bcd96eb54 /plugins/org.eclipse.emf.cdo.server.db | |
parent | ea637f75e42685a7694abf3f9acca7b6cc4f6de2 (diff) | |
download | cdo-1db6ed552d142478f7df15fa798ee53d9b558088.tar.gz cdo-1db6ed552d142478f7df15fa798ee53d9b558088.tar.xz cdo-1db6ed552d142478f7df15fa798ee53d9b558088.zip |
[344231] [DB] Improve Statement.executeBatch result checking
https://bugs.eclipse.org/bugs/show_bug.cgi?id=344231
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.server.db')
-rw-r--r-- | plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/NonAuditListTableMapping.java | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/NonAuditListTableMapping.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/NonAuditListTableMapping.java index 0952a94f95..92d96aad20 100644 --- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/NonAuditListTableMapping.java +++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/NonAuditListTableMapping.java @@ -472,12 +472,7 @@ public class NonAuditListTableMapping extends AbstractListTableMapping implement TRACER.format("Performing {0} delete operations", deleteCounter); //$NON-NLS-1$ } - int[] result = deleteStmt.executeBatch(); - Assert.isTrue(result.length == deleteCounter); - for (int r : result) - { - Assert.isTrue(r == 1); - } + DBUtil.executeBatch(deleteStmt, deleteCounter); } if (moveCounter > 0) @@ -487,12 +482,7 @@ public class NonAuditListTableMapping extends AbstractListTableMapping implement TRACER.format("Performing {0} move operations", moveCounter); //$NON-NLS-1$ } - int[] result = moveStmt.executeBatch(); - Assert.isTrue(result.length == moveCounter); - for (int r : result) - { - Assert.isTrue(r == 1); - } + DBUtil.executeBatch(moveStmt, moveCounter); } if (insertCounter > 0) @@ -502,12 +492,7 @@ public class NonAuditListTableMapping extends AbstractListTableMapping implement TRACER.format("Performing {0} insert operations", insertCounter); //$NON-NLS-1$ } - int[] result = insertStmt.executeBatch(); - Assert.isTrue(result.length == insertCounter); - for (int r : result) - { - Assert.isTrue(r == 1); - } + DBUtil.executeBatch(insertStmt, insertCounter); } if (setValueCounter > 0) @@ -517,12 +502,7 @@ public class NonAuditListTableMapping extends AbstractListTableMapping implement TRACER.format("Performing {0} set operations", setValueCounter); //$NON-NLS-1$ } - int[] result = setValueStmt.executeBatch(); - Assert.isTrue(result.length == setValueCounter); - for (int r : result) - { - Assert.isTrue(r == 1); - } + DBUtil.executeBatch(setValueStmt, setValueCounter); } } catch (SQLException e) |