Fixed missing close statements and cleaned up imports
This commit is contained in:
parent
b8126f36dc
commit
b34b836b5f
|
@ -34,14 +34,20 @@ public class SQLiteDatabase implements IDatabase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void close(ResultSet resultSet, Statement statement, Connection connection) {
|
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
|
@Override
|
||||||
public void close(PreparedStatement preparedStatement, Connection connection) {
|
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.beans.PropertyDescriptor;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
@ -67,7 +66,7 @@ public class SQLiteDatabaseSelectHandler<T> extends AbstractDatabaseHandler<T> {
|
||||||
* @throws IntrospectionException
|
* @throws IntrospectionException
|
||||||
* @throws InvocationTargetException
|
* @throws InvocationTargetException
|
||||||
*/
|
*/
|
||||||
public List<T> selectObjects() throws SQLException,
|
public synchronized List<T> selectObjects() throws SQLException,
|
||||||
SecurityException, IllegalArgumentException,
|
SecurityException, IllegalArgumentException,
|
||||||
InstantiationException, IllegalAccessException,
|
InstantiationException, IllegalAccessException,
|
||||||
IntrospectionException, InvocationTargetException {
|
IntrospectionException, InvocationTargetException {
|
||||||
|
|
|
@ -38,8 +38,6 @@ import org.eclipse.swt.events.MouseListener;
|
||||||
import org.eclipse.swt.events.SelectionAdapter;
|
import org.eclipse.swt.events.SelectionAdapter;
|
||||||
import org.eclipse.swt.events.SelectionEvent;
|
import org.eclipse.swt.events.SelectionEvent;
|
||||||
import org.eclipse.swt.graphics.Point;
|
import org.eclipse.swt.graphics.Point;
|
||||||
import org.eclipse.swt.graphics.Rectangle;
|
|
||||||
import org.eclipse.swt.internal.ole.win32.CONTROLINFO;
|
|
||||||
import org.eclipse.swt.layout.FillLayout;
|
import org.eclipse.swt.layout.FillLayout;
|
||||||
import org.eclipse.swt.layout.GridData;
|
import org.eclipse.swt.layout.GridData;
|
||||||
import org.eclipse.swt.layout.GridLayout;
|
import org.eclipse.swt.layout.GridLayout;
|
||||||
|
@ -55,8 +53,8 @@ import swing2swt.layout.BorderLayout;
|
||||||
|
|
||||||
import com.minres.scviewer.database.ISignal;
|
import com.minres.scviewer.database.ISignal;
|
||||||
import com.minres.scviewer.database.ISignalChange;
|
import com.minres.scviewer.database.ISignalChange;
|
||||||
import com.minres.scviewer.database.ITxStream;
|
|
||||||
import com.minres.scviewer.database.ITx;
|
import com.minres.scviewer.database.ITx;
|
||||||
|
import com.minres.scviewer.database.ITxStream;
|
||||||
import com.minres.scviewer.database.IWaveform;
|
import com.minres.scviewer.database.IWaveform;
|
||||||
|
|
||||||
public class TxDisplay implements PropertyChangeListener, ISelectionProvider, MouseListener{
|
public class TxDisplay implements PropertyChangeListener, ISelectionProvider, MouseListener{
|
||||||
|
|
Loading…
Reference in New Issue