[#5118] Log error in JDBCUtils.safeFree() methods, in case of ignored exception
This commit is contained in:
parent
29f04c0ee4
commit
f465631ddb
@ -75,6 +75,7 @@ import java.sql.SQLXML;
|
||||
import java.sql.Statement;
|
||||
|
||||
import org.jooq.SQLDialect;
|
||||
import org.jooq.tools.JooqLogger;
|
||||
|
||||
/**
|
||||
* JDBC-related utility methods.
|
||||
@ -83,6 +84,8 @@ import org.jooq.SQLDialect;
|
||||
*/
|
||||
public class JDBCUtils {
|
||||
|
||||
private static final JooqLogger log = JooqLogger.getLogger(JDBCUtils.class);
|
||||
|
||||
/**
|
||||
* "Guess" the {@link SQLDialect} from a {@link Connection} instance.
|
||||
* <p>
|
||||
@ -333,7 +336,9 @@ public class JDBCUtils {
|
||||
try {
|
||||
blob.free();
|
||||
}
|
||||
catch (Exception ignore) {}
|
||||
catch (Exception ignore) {
|
||||
log.warn("Error while freeing resource", ignore);
|
||||
}
|
||||
|
||||
// [#3069] The free() method was added only in JDBC 4.0 / Java 1.6
|
||||
catch (AbstractMethodError ignore) {}
|
||||
@ -351,7 +356,9 @@ public class JDBCUtils {
|
||||
try {
|
||||
clob.free();
|
||||
}
|
||||
catch (Exception ignore) {}
|
||||
catch (Exception ignore) {
|
||||
log.warn("Error while freeing resource", ignore);
|
||||
}
|
||||
|
||||
// [#3069] The free() method was added only in JDBC 4.0 / Java 1.6
|
||||
catch (AbstractMethodError ignore) {}
|
||||
@ -369,7 +376,9 @@ public class JDBCUtils {
|
||||
try {
|
||||
xml.free();
|
||||
}
|
||||
catch (Exception ignore) {}
|
||||
catch (Exception ignore) {
|
||||
log.warn("Error while freeing resource", ignore);
|
||||
}
|
||||
|
||||
// [#3069] The free() method was added only in JDBC 4.0 / Java 1.6
|
||||
catch (AbstractMethodError ignore) {}
|
||||
@ -387,7 +396,9 @@ public class JDBCUtils {
|
||||
try {
|
||||
array.free();
|
||||
}
|
||||
catch (Exception ignore) {}
|
||||
catch (Exception ignore) {
|
||||
log.warn("Error while freeing resource", ignore);
|
||||
}
|
||||
|
||||
// [#3069] The free() method was added only in JDBC 4.0 / Java 1.6
|
||||
catch (AbstractMethodError ignore) {}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user