summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-04 13:16:37 +0200
committerNoel Grandin <noel@peralex.com>2014-08-04 13:38:30 +0200
commitf493555623fb36bb51e78a4630483271ed36afe7 (patch)
treeddd107373aafbcbdd3f31a1fd5f4e53e7c073f59 /connectivity
parentcebdd852165cd3080a4eee885dceadcc41173ef3 (diff)
java: remove some casting in lib.TestParameters#getMSF
where the return value is always cast to XMultiServiceFactory, so just do the cast in the method and avoid noise at the call sites. Change-Id: I3a2e06ac6edb3c6021eda6442032db57aaa22e13
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/qa/complex/connectivity/DBaseDriverTest.java8
-rw-r--r--connectivity/qa/complex/connectivity/FlatFileAccess.java2
-rw-r--r--connectivity/qa/complex/connectivity/HsqlDriverTest.java10
-rw-r--r--connectivity/qa/complex/connectivity/JdbcLongVarCharTest.java2
4 files changed, 11 insertions, 11 deletions
diff --git a/connectivity/qa/complex/connectivity/DBaseDriverTest.java b/connectivity/qa/complex/connectivity/DBaseDriverTest.java
index 1a5a6c4c5128..059c0333c24d 100644
--- a/connectivity/qa/complex/connectivity/DBaseDriverTest.java
+++ b/connectivity/qa/complex/connectivity/DBaseDriverTest.java
@@ -55,16 +55,16 @@ public class DBaseDriverTest extends ComplexTestCase implements TestCase
public void Functions() throws com.sun.star.uno.Exception, com.sun.star.beans.UnknownPropertyException
{
- DBaseStringFunctions aStringTest = new DBaseStringFunctions(((XMultiServiceFactory) param.getMSF()), this);
+ DBaseStringFunctions aStringTest = new DBaseStringFunctions((param.getMSF()), this);
aStringTest.testFunctions();
- DBaseNumericFunctions aNumericTest = new DBaseNumericFunctions(((XMultiServiceFactory) param.getMSF()), this);
+ DBaseNumericFunctions aNumericTest = new DBaseNumericFunctions((param.getMSF()), this);
aNumericTest.testFunctions();
- DBaseDateFunctions aDateTest = new DBaseDateFunctions(((XMultiServiceFactory) param.getMSF()), this);
+ DBaseDateFunctions aDateTest = new DBaseDateFunctions((param.getMSF()), this);
aDateTest.testFunctions();
- DBaseSqlTests aSqlTest = new DBaseSqlTests(((XMultiServiceFactory) param.getMSF()), this);
+ DBaseSqlTests aSqlTest = new DBaseSqlTests((param.getMSF()), this);
aSqlTest.testFunctions();
}
}
diff --git a/connectivity/qa/complex/connectivity/FlatFileAccess.java b/connectivity/qa/complex/connectivity/FlatFileAccess.java
index ab7716ace303..b1b5f5788133 100644
--- a/connectivity/qa/complex/connectivity/FlatFileAccess.java
+++ b/connectivity/qa/complex/connectivity/FlatFileAccess.java
@@ -57,7 +57,7 @@ public class FlatFileAccess extends ComplexTestCase
public void before() throws Exception
{
- m_database = new CsvDatabase( (XMultiServiceFactory)param.getMSF() );
+ m_database = new CsvDatabase( param.getMSF() );
// proper settings
final XPropertySet dataSourceSettings = m_database.getDataSource().geSettings();
diff --git a/connectivity/qa/complex/connectivity/HsqlDriverTest.java b/connectivity/qa/complex/connectivity/HsqlDriverTest.java
index 02892c5e84b6..c178e9443194 100644
--- a/connectivity/qa/complex/connectivity/HsqlDriverTest.java
+++ b/connectivity/qa/complex/connectivity/HsqlDriverTest.java
@@ -56,7 +56,7 @@ public class HsqlDriverTest extends ComplexTestCase {
XDataSource ds = null;
System.gc();
try {
- HsqlDatabase database = new HsqlDatabase( (XMultiServiceFactory)param.getMSF() );
+ HsqlDatabase database = new HsqlDatabase( param.getMSF() );
ds = database.getDataSource().getXDataSource();
} catch(Exception ex) {
throw new RuntimeException("factory: unable to construct data source" );
@@ -98,10 +98,10 @@ public class HsqlDriverTest extends ComplexTestCase {
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,((XMultiServiceFactory)param.getMSF()).createInstance("com.sun.star.sdbcx.comp.hsqldb.Driver"));
+ drv = UnoRuntime.queryInterface(XDriver.class,param.getMSF().createInstance("com.sun.star.sdbcx.comp.hsqldb.Driver"));
- TestCacheSize test = new TestCacheSize(((XMultiServiceFactory)param.getMSF()),info,drv);
+ TestCacheSize test = new TestCacheSize((param.getMSF()),info,drv);
StopWatch sw = new StopWatch();
@@ -129,8 +129,8 @@ public class HsqlDriverTest extends ComplexTestCase {
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,((XMultiServiceFactory)param.getMSF()).createInstance("com.sun.star.comp.sdbc.JDBCDriver"));
- TestCacheSize test = new TestCacheSize(((XMultiServiceFactory)param.getMSF()),info,drv);
+ 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");
diff --git a/connectivity/qa/complex/connectivity/JdbcLongVarCharTest.java b/connectivity/qa/complex/connectivity/JdbcLongVarCharTest.java
index 7bc75d94b466..b34a8185be87 100644
--- a/connectivity/qa/complex/connectivity/JdbcLongVarCharTest.java
+++ b/connectivity/qa/complex/connectivity/JdbcLongVarCharTest.java
@@ -64,7 +64,7 @@ public class JdbcLongVarCharTest extends ComplexTestCase
//prop[0] = new PropertyValue("JavaDriverClass", 0, "com.ingres.jdbc.IngresDriver", PropertyState.DIRECT_VALUE);
// get the remote office component context
- XMultiServiceFactory xServiceManager = (XMultiServiceFactory) param.getMSF();
+ XMultiServiceFactory xServiceManager = param.getMSF();
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);