mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-23 23:28:55 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user