diff --git a/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabase.java b/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabase.java index 4ac8b2e..5a86ada 100644 --- a/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabase.java +++ b/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabase.java @@ -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) {} } } diff --git a/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabaseSelectHandler.java b/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabaseSelectHandler.java index 30a1341..c6cf7ed 100644 --- a/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabaseSelectHandler.java +++ b/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabaseSelectHandler.java @@ -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 extends AbstractDatabaseHandler { * @throws IntrospectionException * @throws InvocationTargetException */ - public List selectObjects() throws SQLException, + public synchronized List selectObjects() throws SQLException, SecurityException, IllegalArgumentException, InstantiationException, IllegalAccessException, IntrospectionException, InvocationTargetException { diff --git a/com.minres.scviewer.ui/src/com/minres/scviewer/ui/swt/TxDisplay.java b/com.minres.scviewer.ui/src/com/minres/scviewer/ui/swt/TxDisplay.java index 51d9f5f..8d3db1a 100644 --- a/com.minres.scviewer.ui/src/com/minres/scviewer/ui/swt/TxDisplay.java +++ b/com.minres.scviewer.ui/src/com/minres/scviewer/ui/swt/TxDisplay.java @@ -38,8 +38,6 @@ import org.eclipse.swt.events.MouseListener; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; 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.GridData; 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.ISignalChange; -import com.minres.scviewer.database.ITxStream; import com.minres.scviewer.database.ITx; +import com.minres.scviewer.database.ITxStream; import com.minres.scviewer.database.IWaveform; public class TxDisplay implements PropertyChangeListener, ISelectionProvider, MouseListener{