Kaydet (Commit) a30022e1 authored tarafından Robert Antoni Buj i Gelonch's avatar Robert Antoni Buj i Gelonch Kaydeden (comit) Noel Grandin

connectivity: the assigned value is never used

Change-Id: I6e4d2fc6563f0ff1a65e114d018675c314a04fd6
Reviewed-on: https://gerrit.libreoffice.org/11741Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
Tested-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 5f45400c
......@@ -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");
......
......@@ -58,7 +58,6 @@ public class JdbcLongVarCharTest extends ComplexTestCase
System.out.println("== Start testing ==");
String url = "jdbc:mysql://localhost:3306/mysql?user=root";
com.sun.star.sdbc.XConnection xConnection = null;
com.sun.star.beans.PropertyValue prop[] = new PropertyValue[1];
prop[0] = new PropertyValue("JavaDriverClass", 0, "com.mysql.jdbc.Driver", PropertyState.DIRECT_VALUE);
......@@ -67,7 +66,7 @@ public class JdbcLongVarCharTest extends ComplexTestCase
Object x = xServiceManager.createInstance("com.sun.star.sdbc.DriverManager");
com.sun.star.sdbc.XDriverAccess xDriverAccess = UnoRuntime.queryInterface(XDriverAccess.class, x);
com.sun.star.sdbc.XDriver xDriver = xDriverAccess.getDriverByURL(url);
xConnection = xDriver.connect(url, prop);
com.sun.star.sdbc.XConnection xConnection = xDriver.connect(url, prop);
Object prepStmnt = xConnection.prepareStatement("SELECT * FROM i90114 WHERE i90114.c1 = ?");
UnoRuntime.queryInterface(XParameters.class, prepStmnt).clearParameters();
......@@ -91,8 +90,7 @@ public class JdbcLongVarCharTest extends ComplexTestCase
{
String str = "not set";
XClob xClob = null;
xClob = xRow.getClob(2);
XClob xClob = xRow.getClob(2);
if (xClob != null)
{
System.out.println("xClob != null");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment