Fixed missing close statements and cleaned up imports

This commit is contained in:
ejentzsx
2015-01-09 11:58:14 +01:00
parent b8126f36dc
commit b34b836b5f
3 changed files with 11 additions and 8 deletions

View File

@ -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) {}
}
}

View File

@ -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 {