summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/ifc/io
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-06-27 15:40:17 +0200
committerMichael Stahl <mstahl@redhat.com>2012-06-29 22:03:01 +0200
commitb65017a2a7af290f6681da7b197a52efe83d5185 (patch)
tree06f71a435ba200d044109469b13be7c8f5dbe950 /qadevOOo/tests/java/ifc/io
parent33ec740d1438c3dddf8e1974757ed05bb76425ca (diff)
Java5 update - usage generics where possible
Change-Id: I12f8c448961919e153047e28fee2a0acf3af1002
Diffstat (limited to 'qadevOOo/tests/java/ifc/io')
-rw-r--r--qadevOOo/tests/java/ifc/io/_XActiveDataSource.java2
-rw-r--r--qadevOOo/tests/java/ifc/io/_XConnectable.java2
-rw-r--r--qadevOOo/tests/java/ifc/io/_XDataInputStream.java2
-rw-r--r--qadevOOo/tests/java/ifc/io/_XInputStream.java2
-rw-r--r--qadevOOo/tests/java/ifc/io/_XPersistObject.java24
5 files changed, 12 insertions, 20 deletions
diff --git a/qadevOOo/tests/java/ifc/io/_XActiveDataSource.java b/qadevOOo/tests/java/ifc/io/_XActiveDataSource.java
index 1e1636e13709..a7092aa91ce2 100644
--- a/qadevOOo/tests/java/ifc/io/_XActiveDataSource.java
+++ b/qadevOOo/tests/java/ifc/io/_XActiveDataSource.java
@@ -55,7 +55,7 @@ public class _XActiveDataSource extends MultiMethodTest {
*/
public void before() {
XInterface x = (XInterface)tEnv.getObjRelation("OutputStream");
- oStream = (XOutputStream) UnoRuntime.queryInterface
+ oStream = UnoRuntime.queryInterface
(XOutputStream.class, x) ;
}
diff --git a/qadevOOo/tests/java/ifc/io/_XConnectable.java b/qadevOOo/tests/java/ifc/io/_XConnectable.java
index c46cc881f882..8c8d061b9c7c 100644
--- a/qadevOOo/tests/java/ifc/io/_XConnectable.java
+++ b/qadevOOo/tests/java/ifc/io/_XConnectable.java
@@ -53,7 +53,7 @@ public class _XConnectable extends MultiMethodTest {
*/
public void before() {
XInterface x = (XInterface)tEnv.getObjRelation("Connectable");
- xConnect = (XConnectable)UnoRuntime.queryInterface(
+ xConnect = UnoRuntime.queryInterface(
XConnectable.class, x) ;
}
diff --git a/qadevOOo/tests/java/ifc/io/_XDataInputStream.java b/qadevOOo/tests/java/ifc/io/_XDataInputStream.java
index c59fe46493f1..cb96c3ca11a6 100644
--- a/qadevOOo/tests/java/ifc/io/_XDataInputStream.java
+++ b/qadevOOo/tests/java/ifc/io/_XDataInputStream.java
@@ -79,7 +79,7 @@ public class _XDataInputStream extends MultiMethodTest {
public void before(){
XInterface x = (XInterface)tEnv.getObjRelation("StreamWriter") ;
- oStream = (XDataOutputStream)UnoRuntime.queryInterface(
+ oStream = UnoRuntime.queryInterface(
XDataOutputStream.class, x);
List data = (List) tEnv.getObjRelation("StreamData") ;
if (data == null || oStream == null) {
diff --git a/qadevOOo/tests/java/ifc/io/_XInputStream.java b/qadevOOo/tests/java/ifc/io/_XInputStream.java
index 3f16ce62d0d4..738b252b96d1 100644
--- a/qadevOOo/tests/java/ifc/io/_XInputStream.java
+++ b/qadevOOo/tests/java/ifc/io/_XInputStream.java
@@ -62,7 +62,7 @@ public class _XInputStream extends MultiMethodTest {
*/
public void before() {
XInterface x = (XInterface)tEnv.getObjRelation("StreamWriter");
- oStream = (XOutputStream)UnoRuntime.queryInterface(
+ oStream = UnoRuntime.queryInterface(
XOutputStream.class, x) ;
bytes = (byte[])tEnv.getObjRelation("ByteData");
try {
diff --git a/qadevOOo/tests/java/ifc/io/_XPersistObject.java b/qadevOOo/tests/java/ifc/io/_XPersistObject.java
index 66aab4e42b09..fe8f9c162fd9 100644
--- a/qadevOOo/tests/java/ifc/io/_XPersistObject.java
+++ b/qadevOOo/tests/java/ifc/io/_XPersistObject.java
@@ -214,33 +214,25 @@ public class _XPersistObject extends MultiMethodTest {
Object mostream = ((XMultiServiceFactory)tParam.getMSF()).createInstance
("com.sun.star.io.MarkableOutputStream");
- XActiveDataSink xdSi = (XActiveDataSink)
- UnoRuntime.queryInterface(XActiveDataSink.class, istream);
- XActiveDataSource xdSo = (XActiveDataSource)
- UnoRuntime.queryInterface(XActiveDataSource.class, ostream);
- XActiveDataSink xdSmi = (XActiveDataSink)
- UnoRuntime.queryInterface(XActiveDataSink.class, mistream);
- XActiveDataSource xdSmo = (XActiveDataSource)
- UnoRuntime.queryInterface(XActiveDataSource.class, mostream);
+ XActiveDataSink xdSi = UnoRuntime.queryInterface(XActiveDataSink.class, istream);
+ XActiveDataSource xdSo = UnoRuntime.queryInterface(XActiveDataSource.class, ostream);
+ XActiveDataSink xdSmi = UnoRuntime.queryInterface(XActiveDataSink.class, mistream);
+ XActiveDataSource xdSmo = UnoRuntime.queryInterface(XActiveDataSource.class, mostream);
XInputStream miStream = (XInputStream)
UnoRuntime.queryInterface(XInputStream.class, mistream);
- XOutputStream moStream = (XOutputStream)
- UnoRuntime.queryInterface(XOutputStream.class, mostream);
+ XOutputStream moStream = UnoRuntime.queryInterface(XOutputStream.class, mostream);
XInputStream PipeIn = (XInputStream)
UnoRuntime.queryInterface(XInputStream.class, aPipe);
- XOutputStream PipeOut = (XOutputStream)
- UnoRuntime.queryInterface(XOutputStream.class,aPipe);
+ XOutputStream PipeOut = UnoRuntime.queryInterface(XOutputStream.class,aPipe);
xdSi.setInputStream(miStream);
xdSo.setOutputStream(moStream);
xdSmi.setInputStream(PipeIn);
xdSmo.setOutputStream(PipeOut);
- iStream = (XObjectInputStream)
- UnoRuntime.queryInterface(XObjectInputStream.class, istream);
- oStream = (XObjectOutputStream)
- UnoRuntime.queryInterface(XObjectOutputStream.class, ostream);
+ iStream = UnoRuntime.queryInterface(XObjectInputStream.class, istream);
+ oStream = UnoRuntime.queryInterface(XObjectOutputStream.class, ostream);
} catch (com.sun.star.uno.Exception e) {