diff options
author | Robert Antoni Buj i Gelonch <robert.buj@gmail.com> | 2014-10-01 16:12:26 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-10-01 14:13:50 +0000 |
commit | a30022e17cbf5b378c1074ce587b3ff40ac6f92c (patch) | |
tree | 1fd9037320b21daa0eb8619d0dc0b6f70c0ed1e1 /connectivity/qa/complex/connectivity/HsqlDriverTest.java | |
parent | 5f45400ca17d52a4ee40672ac409b6521ad86f76 (diff) |
connectivity: the assigned value is never used
Change-Id: I6e4d2fc6563f0ff1a65e114d018675c314a04fd6
Reviewed-on: https://gerrit.libreoffice.org/11741
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'connectivity/qa/complex/connectivity/HsqlDriverTest.java')
-rw-r--r-- | connectivity/qa/complex/connectivity/HsqlDriverTest.java | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/connectivity/qa/complex/connectivity/HsqlDriverTest.java b/connectivity/qa/complex/connectivity/HsqlDriverTest.java index a0ff160b1fb8..5a399a2de362 100644 --- a/connectivity/qa/complex/connectivity/HsqlDriverTest.java +++ b/connectivity/qa/complex/connectivity/HsqlDriverTest.java @@ -88,17 +88,15 @@ public class HsqlDriverTest extends ComplexTestCase { xComp.dispose(); } catch(Exception e){} - com.sun.star.beans.PropertyValue[] info = null; - XDriver drv = null; try{ XDocumentSubStorageSupplier doc = UnoRuntime.queryInterface(XDocumentSubStorageSupplier.class,ds); XModel mod = UnoRuntime.queryInterface(XModel.class,ds); XStorage stor = doc.getDocumentSubStorage("database",4); - info = new com.sun.star.beans.PropertyValue[]{ + com.sun.star.beans.PropertyValue[] info = new com.sun.star.beans.PropertyValue[]{ new com.sun.star.beans.PropertyValue("Storage",0,stor,PropertyState.DIRECT_VALUE) ,new com.sun.star.beans.PropertyValue("URL",0,mod.getURL(),PropertyState.DIRECT_VALUE) }; - drv = UnoRuntime.queryInterface(XDriver.class,param.getMSF().createInstance("com.sun.star.sdbcx.comp.hsqldb.Driver")); + XDriver drv = UnoRuntime.queryInterface(XDriver.class,param.getMSF().createInstance("com.sun.star.sdbcx.comp.hsqldb.Driver")); TestCacheSize test = new TestCacheSize((param.getMSF()),info,drv); @@ -119,17 +117,16 @@ public class HsqlDriverTest extends ComplexTestCase { } catch(Exception e){} }catch(Exception e){} } + public void test2(){ System.gc(); - com.sun.star.beans.PropertyValue[] info = null; - XDriver drv = null; try{ - info = new com.sun.star.beans.PropertyValue[]{ + com.sun.star.beans.PropertyValue[] info = new com.sun.star.beans.PropertyValue[]{ new com.sun.star.beans.PropertyValue("JavaDriverClass",0,"org.hsqldb.jdbcDriver",PropertyState.DIRECT_VALUE) ,new com.sun.star.beans.PropertyValue("ParameterNameSubstitution",0, false,PropertyState.DIRECT_VALUE) }; - drv = UnoRuntime.queryInterface(XDriver.class,param.getMSF().createInstance("com.sun.star.comp.sdbc.JDBCDriver")); + XDriver drv = UnoRuntime.queryInterface(XDriver.class,param.getMSF().createInstance("com.sun.star.comp.sdbc.JDBCDriver")); TestCacheSize test = new TestCacheSize((param.getMSF()),info,drv); test.setURL("jdbc:hsqldb:g:\\hsql\\db"); |