Refactor tidy internals - BatchedPstmtHolder, always true condition (no effective change)

Remove condition check on firstError == null ... as it is always true
This commit is contained in:
rob bygrave
2019-06-24 13:41:21 +12:00
parent e2a467ca5a
commit a1e185b0f6
@@ -117,7 +117,6 @@ public class BatchedPstmtHolder {
BatchedPstmt[] values = stmtMap.values().toArray(new BatchedPstmt[stmtMap.values().size()]);
clear();
// this loop
for (BatchedPstmt bs : values) {
try {
if (!isError) {
@@ -130,12 +129,8 @@ public class BatchedPstmtHolder {
next = next.getNextException();
}
if (firstError == null) {
firstError = ex;
errorSql = bs.getSql();
} else {
logger.error("Error executing batched PreparedStatement", ex);
}
firstError = ex;
errorSql = bs.getSql();
isError = true;
} finally {
@@ -147,7 +142,6 @@ public class BatchedPstmtHolder {
}
}
if (firstError != null) {
String msg = "Error when batch flush on sql: " + errorSql;
throw new BatchedSqlException(msg, firstError);