#1293 - Refactor - move JdbcClose into io.ebean.util ... from io.ebeaninternal.util as it is used in public API (platform code, sequences etc)

This commit is contained in:
Rob Bygrave
2018-02-27 12:56:20 +13:00
parent 3dfdd0e2e8
commit 06bce35f5a
20 changed files with 43 additions and 159 deletions
@@ -1,5 +1,6 @@
package io.ebeaninternal.server.query;
import io.ebean.util.JdbcClose;
import io.ebeaninternal.api.SpiProfileTransactionEvent;
import io.ebeaninternal.api.SpiQuery;
import io.ebeaninternal.api.SpiTransaction;
@@ -169,14 +170,8 @@ class CQueryFetchSingleAttribute implements SpiProfileTransactionEvent {
} catch (SQLException e) {
logger.error("Error closing DataReader", e);
}
try {
if (pstmt != null) {
pstmt.close();
pstmt = null;
}
} catch (SQLException e) {
logger.error("Error closing PreparedStatement", e);
}
JdbcClose.close(pstmt);
pstmt = null;
}
@Override