Fixed missing close statements and cleaned up imports
This commit is contained in:
@ -34,14 +34,20 @@ public class SQLiteDatabase implements IDatabase {
|
||||
|
||||
@Override
|
||||
public void close(ResultSet resultSet, Statement statement, Connection connection) {
|
||||
// TODO Auto-generated method stub
|
||||
try {
|
||||
resultSet.close();
|
||||
statement.close();
|
||||
connection.close();
|
||||
} catch (SQLException e) {}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close(PreparedStatement preparedStatement, Connection connection) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
try {
|
||||
preparedStatement.close();
|
||||
connection.close();
|
||||
} catch (SQLException e) {}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ import java.beans.IntrospectionException;
|
||||
import java.beans.PropertyDescriptor;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
@ -67,7 +66,7 @@ public class SQLiteDatabaseSelectHandler<T> extends AbstractDatabaseHandler<T> {
|
||||
* @throws IntrospectionException
|
||||
* @throws InvocationTargetException
|
||||
*/
|
||||
public List<T> selectObjects() throws SQLException,
|
||||
public synchronized List<T> selectObjects() throws SQLException,
|
||||
SecurityException, IllegalArgumentException,
|
||||
InstantiationException, IllegalAccessException,
|
||||
IntrospectionException, InvocationTargetException {
|
||||
|
Reference in New Issue
Block a user