mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 12:49:55 +01:00
All tryToClose() methods should check for null arguments.
This commit is contained in:
@@ -404,16 +404,16 @@ abstract class JdbcDatabase implements Database<Connection> {
|
||||
}
|
||||
|
||||
private void tryToClose(ResultSet rs) {
|
||||
if(rs != null) try {
|
||||
rs.close();
|
||||
try {
|
||||
if(rs != null) rs.close();
|
||||
} catch(SQLException e) {
|
||||
if(LOG.isLoggable(WARNING))LOG.log(WARNING, e.toString(), e);
|
||||
}
|
||||
}
|
||||
|
||||
private void tryToClose(Statement s) {
|
||||
if(s != null) try {
|
||||
s.close();
|
||||
try {
|
||||
if(s != null) s.close();
|
||||
} catch(SQLException e) {
|
||||
if(LOG.isLoggable(WARNING))LOG.log(WARNING, e.toString(), e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user