diff options
author | Noel Grandin <noel@peralex.com> | 2012-08-21 09:11:31 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-08-28 16:15:44 +0200 |
commit | 05f7bb2e3eba3cdf0098b63e9431c76001738794 (patch) | |
tree | 65e27c098c2d4a6d0a8228ea3f0ee2742aa2597a /connectivity | |
parent | 938506285925f27ac6b94c076e81ca7c7303be58 (diff) |
Java cleanup - remove unused parameters and fields
Change-Id: I4e9a27ce0b5f6d782034306afadb1b9d0ed9a2ba
Diffstat (limited to 'connectivity')
5 files changed, 5 insertions, 14 deletions
diff --git a/connectivity/qa/connectivity/tools/AbstractDatabase.java b/connectivity/qa/connectivity/tools/AbstractDatabase.java index 5890829a6f1b..c3895081f51f 100644 --- a/connectivity/qa/connectivity/tools/AbstractDatabase.java +++ b/connectivity/qa/connectivity/tools/AbstractDatabase.java @@ -167,7 +167,7 @@ public abstract class AbstractDatabase implements DatabaseAccess final XDocumentDataSource dataSource = UnoRuntime.queryInterface( XDocumentDataSource.class, dbContext.getByName( _docURL ) ); m_databaseDocument = dataSource.getDatabaseDocument(); - m_dataSource = new DataSource(m_orb, m_databaseDocument.getDataSource()); + m_dataSource = new DataSource(m_databaseDocument.getDataSource()); } /** returns the URL of the ODB document represented by this instance diff --git a/connectivity/qa/connectivity/tools/CRMDatabase.java b/connectivity/qa/connectivity/tools/CRMDatabase.java index 68acdfb2b295..5769a0078abe 100644 --- a/connectivity/qa/connectivity/tools/CRMDatabase.java +++ b/connectivity/qa/connectivity/tools/CRMDatabase.java @@ -44,7 +44,6 @@ public class CRMDatabase private static final String VARCHAR50 = "VARCHAR(50)"; private final XMultiServiceFactory m_orb; private final HsqlDatabase m_database; - private final DataSource m_dataSource; private final Connection m_connection; /** constructs the CRM database @@ -54,7 +53,6 @@ public class CRMDatabase m_orb = _orb; m_database = new HsqlDatabase( m_orb ); - m_dataSource = m_database.getDataSource(); if ( _withUI ) { @@ -87,7 +85,6 @@ public class CRMDatabase m_orb = _orb; m_database = new HsqlDatabase( m_orb, _existingDocumentURL ); - m_dataSource = m_database.getDataSource(); m_connection = m_database.defaultConnection(); } diff --git a/connectivity/qa/connectivity/tools/DataSource.java b/connectivity/qa/connectivity/tools/DataSource.java index 36b62cddb8db..6b6048c44a96 100644 --- a/connectivity/qa/connectivity/tools/DataSource.java +++ b/connectivity/qa/connectivity/tools/DataSource.java @@ -36,22 +36,18 @@ public class DataSource { // the service factory - private final XMultiServiceFactory m_orb; private XDataSource m_dataSource; public DataSource(final XMultiServiceFactory _orb, final String _registeredName) throws Exception { - m_orb = _orb; - final XNameAccess dbContext = UnoRuntime.queryInterface( XNameAccess.class, _orb.createInstance( "com.sun.star.sdb.DatabaseContext" ) ); m_dataSource = UnoRuntime.queryInterface( XDataSource.class, dbContext.getByName( _registeredName ) ); } - public DataSource(final XMultiServiceFactory _orb,final XDataSource _dataSource) + public DataSource(final XDataSource _dataSource) { - m_orb = _orb; m_dataSource = _dataSource; } diff --git a/connectivity/qa/connectivity/tools/FlatFileDatabase.java b/connectivity/qa/connectivity/tools/FlatFileDatabase.java index eeb326b00452..5af55c6cec66 100644 --- a/connectivity/qa/connectivity/tools/FlatFileDatabase.java +++ b/connectivity/qa/connectivity/tools/FlatFileDatabase.java @@ -80,7 +80,7 @@ class FlatFileDatabase extends AbstractDatabase m_databaseDocument = UnoRuntime.queryInterface( XOfficeDatabaseDocument.class, m_orb.createInstance("com.sun.star.sdb.OfficeDatabaseDocument")); - m_dataSource = new DataSource(m_orb, m_databaseDocument.getDataSource()); + m_dataSource = new DataSource(m_databaseDocument.getDataSource()); final XPropertySet dsProperties = UnoRuntime.queryInterface(XPropertySet.class, m_databaseDocument.getDataSource()); dsProperties.setPropertyValue("URL", "sdbc:" + m_urlSubScheme + ":" + path); @@ -93,10 +93,8 @@ class FlatFileDatabase extends AbstractDatabase @param _name the name of the table to drop - @param _ifExists - TRUE if it should be dropped only when it exists. */ - public void dropTable(final String _name,final boolean _ifExists) throws SQLException + public void dropTable(final String _name) throws SQLException { String dropStatement = "DROP TABLE \"" + _name; executeSQL(dropStatement); diff --git a/connectivity/qa/connectivity/tools/HsqlDatabase.java b/connectivity/qa/connectivity/tools/HsqlDatabase.java index f2ad47b65669..4a733efc64b2 100644 --- a/connectivity/qa/connectivity/tools/HsqlDatabase.java +++ b/connectivity/qa/connectivity/tools/HsqlDatabase.java @@ -66,7 +66,7 @@ public class HsqlDatabase extends AbstractDatabase m_databaseDocument = UnoRuntime.queryInterface( XOfficeDatabaseDocument.class, m_orb.createInstance("com.sun.star.sdb.OfficeDatabaseDocument")); - m_dataSource = new DataSource(m_orb, m_databaseDocument.getDataSource()); + m_dataSource = new DataSource(m_databaseDocument.getDataSource()); final XPropertySet dsProperties = UnoRuntime.queryInterface(XPropertySet.class, m_databaseDocument.getDataSource()); dsProperties.setPropertyValue("URL", "sdbc:embedded:hsqldb"); |