in adb2client/src/main/java/com/alibaba/cloud/analyticdb/adbclient/AdbClient.java [760:794]
private void closeDBResources(ResultSet rs, Statement stmt, Connection conn) {
List<String> errList = new ArrayList<String>();
Exception ex = null;
if (null != rs) {
try {
rs.close();
} catch (Exception e) {
errList.add("Close ResultSet occur SQLException " + e.getMessage());
ex = e;
}
}
if (null != stmt) {
try {
stmt.close();
} catch (Exception e) {
errList.add("Close Statement occur SQLException " + e.getMessage());
ex = e;
}
}
if (null != conn) {
try {
conn.close();
} catch (Exception e) {
errList.add("Close Connection occur SQLException " + e.getMessage());
ex = e;
}
}
if (errList.size() > 0) {
logger("error", AdbClientException.CLOSE_CONNECTION_ERROR + errList.toString());
// throw new AdbClientException(AdbClientException.CLOSE_CONNECTION_ERROR, errList.toString(), ex);
}
}