summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetStubFactory.java
diff options
context:
space:
mode:
authorStephan Wunderlich <sw@openoffice.org>2003-01-31 09:04:13 +0000
committerStephan Wunderlich <sw@openoffice.org>2003-01-31 09:04:13 +0000
commit8cde093e2fa8fe90eed966e768fccb4daca24320 (patch)
treea0c8c03f53542f9e69f4c703aee58af242b28229 /qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetStubFactory.java
parent4af95888deb97a88ab3d56afb52e3854b5d2563e (diff)
CHG: using AnyConverter instead of simple cast
Diffstat (limited to 'qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetStubFactory.java')
-rw-r--r--qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetStubFactory.java18
1 files changed, 13 insertions, 5 deletions
diff --git a/qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetStubFactory.java b/qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetStubFactory.java
index cad2598daea9..40eb175aa964 100644
--- a/qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetStubFactory.java
+++ b/qadevOOo/tests/java/mod/_cached/CachedDynamicResultSetStubFactory.java
@@ -2,9 +2,9 @@
*
* $RCSfile: CachedDynamicResultSetStubFactory.java,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change:$Date: 2003-01-27 18:14:21 $
+ * last change:$Date: 2003-01-31 10:04:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -75,6 +75,8 @@ import com.sun.star.ucb.XContentProvider;
import com.sun.star.ucb.XDynamicResultSet;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XInterface;
+import com.sun.star.uno.Type;
+import com.sun.star.uno.AnyConverter;
import java.io.PrintWriter;
import lib.StatusException;
import lib.TestCase;
@@ -184,7 +186,14 @@ public class CachedDynamicResultSetStubFactory extends TestCase {
(OpenMode.ALL, 10000, null, new Property[] {prop},
new NumberedSortingInfo[0])) ;
- dynResSet = (XDynamicResultSet) cmdProc.execute(cmd, 0, null) ;
+ dynResSet = null;
+ try {
+ dynResSet = (XDynamicResultSet)
+ AnyConverter.toObject(new Type(XDynamicResultSet.class),
+ cmdProc.execute(cmd, 0, null));
+ } catch (com.sun.star.lang.IllegalArgumentException iae) {
+ throw new StatusException("Couldn't convert Any ",iae);
+ }
} catch (com.sun.star.uno.Exception e) {
log.println("Can't create relation." );
@@ -197,5 +206,4 @@ public class CachedDynamicResultSetStubFactory extends TestCase {
return tEnv;
} // finish method getTestEnvironment
-}
-
+} \ No newline at end of file