diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-09-16 14:37:52 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-09-16 14:37:52 +0000 |
commit | c7788533a2565593405e55b617d09425e08ef439 (patch) | |
tree | 3f5e079ea8633edfe8fd37ec9a6fe40a0a4f952f /bridges/test | |
parent | 36fc972942594e186e6924bfc1568bfb0096733e (diff) |
CWS-TOOLING: integrate CWS sb113
2009-09-01 sb #i76393# second attempt at properly #ifdef-ing previous HG commit d598efdbf012
2009-08-28 sb #i102469# change back <T extends XInterface> to just <T> on queryInterface, to avoid binary incompatibility (method changing its signature from (Ljava/lang/Class;Ljava/lang/Object;)Ljava/lang/Object; to (Ljava/lang/Class;Ljava/lang/Object;)Lcom/sun/star/uno/XInterface;)
2009-08-28 sb #i76393# properly #ifdef previous HG commit d598efdbf012
2009-08-27 sb #i94421# work around compiler error (based on a patch supplied by cloph)
2009-08-26 sb merged in DEV300_m56
2009-08-26 sb #i76393# on Linux, include dynamic section offset in crash report so as to be able to map "prelinked" callstacks back to original (patch by cmc)
2009-08-26 sb #i88162# remove unnecessary whitespace lines from per-locale xcu files (patch by tora)
2009-08-17 Juergen Schmidt #i104292# set context classloader after create new custom UNO loader
2009-08-17 Juergen Schmidt #i103749# integrate patch
2009-08-14 sb #i103269# cherry-picked ssh://hg@hg.services.openoffice.org/cws/sb111 -r 5124ebd5edd1 ("#i101955# changed encoding of XML file content from erroneous ISO-8859-1 to UTF-8")
2009-08-12 sb #i102469# fixed mis-applications of UnoRuntime.queryInterface (detected via the simplified UnoRuntime.queryInterface, the HG changeset 29de35fc9554) to use AnyConverter instead; changed qadevOOo's lib.MultiMethodTest.before to allow throwing arbitrary exceptions, to cater for IllegalArgumentException thrown by AnyConverter
2009-08-12 sb #i104178# drop extra libxml2-config script from libxmlsec
2009-08-10 sb #i101754# simplified osl_getProcessInfo for LINUX (patch by cmc)
2009-08-10 sb #i95018# avoid closing -1 fds (patch supplied by cmc)
2009-08-10 sb #i103585# removed (apparently unnecessary) zlib support from libxml2; in turn, removed zlib dependencies from libxmlsec, libxslt, and redland (assuming those were transitive dependencies brought in by direct dependencies on libxml2)
2009-08-10 sb #i102469# simplified UnoRuntime.queryInterface using Java 5 generics; adapted URE-related modules accordingly
2009-08-10 sb #i101213# adapted setsolar env (solenv/config/) to set PYTHONPATH (and not set PYTHONHOME) in accordance with configure env (set_soenv.in); fixed testtools/source/bridgetest/pyuno (which now should work everywhere out of the box, thanks to the fixed setsolar PYTHONPATH)
2009-08-10 sb cherry-picked ssh://hg@hg.services.openoffice.org/cws/sb111 -r ea8de6d9396b ("#i101955# work in progress for a .hgignore file, continued")
Diffstat (limited to 'bridges/test')
17 files changed, 40 insertions, 50 deletions
diff --git a/bridges/test/com/sun/star/lib/TestBed.java b/bridges/test/com/sun/star/lib/TestBed.java index 7242b56438f0..5e2c5e7859c8 100644 --- a/bridges/test/com/sun/star/lib/TestBed.java +++ b/bridges/test/com/sun/star/lib/TestBed.java @@ -130,7 +130,7 @@ public final class TestBed { throws com.sun.star.uno.Exception { XConnector connector = Connector.create(context); - XBridgeFactory factory = (XBridgeFactory) UnoRuntime.queryInterface( + XBridgeFactory factory = UnoRuntime.queryInterface( XBridgeFactory.class, context.getServiceManager().createInstanceWithContext( "com.sun.star.bridge.BridgeFactory", context)); @@ -169,7 +169,7 @@ public final class TestBed { = Bootstrap.createInitialComponentContext(null); XAcceptor acceptor = Acceptor.create(context); XBridgeFactory factory - = (XBridgeFactory) UnoRuntime.queryInterface( + = UnoRuntime.queryInterface( XBridgeFactory.class, context.getServiceManager().createInstanceWithContext( "com.sun.star.bridge.BridgeFactory", context)); diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug107753_Test.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug107753_Test.java index a2c4122d3017..2c7e314afc82 100644 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug107753_Test.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug107753_Test.java @@ -68,22 +68,19 @@ public final class Bug107753_Test extends ComplexTestCase { protected boolean run(XComponentContext context) throws Throwable { boolean success = true; - XTransport transport = (XTransport) UnoRuntime.queryInterface( + XTransport transport = UnoRuntime.queryInterface( XTransport.class, getBridge(context).getInstance("Transport")); Object obj1a = new XType1() {}; - XType1 obj1b = (XType1) UnoRuntime.queryInterface(XType1.class, - obj1a); + XType1 obj1b = UnoRuntime.queryInterface(XType1.class, obj1a); success &= test("obj1a == obj1b", obj1a == obj1b); Object obj2a = new XType2() {}; - XType2 obj2b = (XType2) UnoRuntime.queryInterface(XType2.class, - obj2a); + XType2 obj2b = UnoRuntime.queryInterface(XType2.class, obj2a); success &= test("obj2a == obj2b", obj2a == obj2b); Object obj3a = transport.getType1(); - XType1 obj3b = (XType1) UnoRuntime.queryInterface(XType1.class, - obj3a); + XType1 obj3b = UnoRuntime.queryInterface(XType1.class, obj3a); success &= test( "obj3a != obj3b; only meaningful as long as different proxy" + " instances are used for different UNO interfaces of one UNO" @@ -91,8 +88,7 @@ public final class Bug107753_Test extends ComplexTestCase { obj3a != obj3b); Object obj4a = transport.getType2(); - XType2 obj4b = (XType2) UnoRuntime.queryInterface(XType2.class, - obj4a); + XType2 obj4b = UnoRuntime.queryInterface(XType2.class, obj4a); success &= test( "obj4a != obj4b; only meaningful as long as different proxy" + " instances are used for different UNO interfaces of one UNO" diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug108825_Test.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug108825_Test.java index 6e9d97f7034d..0585e1c8f650 100644 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug108825_Test.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug108825_Test.java @@ -68,7 +68,7 @@ public final class Bug108825_Test extends ComplexTestCase { } protected boolean run(XComponentContext context) throws Throwable { - XTest test = (XTest) UnoRuntime.queryInterface( + XTest test = UnoRuntime.queryInterface( XTest.class, getBridge(context).getInstance("Test")); // Send the XObject that is held on the server side amidst two // dummies that are not held on the server side; then wait for the diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug110892_Test.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug110892_Test.java index 76bd9d37a10c..1a537895b0ed 100644 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug110892_Test.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug110892_Test.java @@ -71,7 +71,7 @@ public final class Bug110892_Test extends ComplexTestCase { } protected boolean run(XComponentContext context) throws Throwable { - XTest test = (XTest) UnoRuntime.queryInterface( + XTest test = UnoRuntime.queryInterface( XTest.class, getBridge(context).getInstance("Test")); test.start(new ClientObject()); synchronized (lock) { diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug111153_Test.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug111153_Test.java index d1f09509d9a3..40eccdba2cc6 100644 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug111153_Test.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug111153_Test.java @@ -63,7 +63,7 @@ public final class Bug111153_Test extends ComplexTestCase { } protected boolean run(XComponentContext context) throws Throwable { - XTransport t = (XTransport) UnoRuntime.queryInterface( + XTransport t = UnoRuntime.queryInterface( XTransport.class, getBridge(context).getInstance("Transport")); XDerived d = new XDerived() {}; t.setDerived(d); diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug51323_Test.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug51323_Test.java index 32bfe9d832a3..247bf65ba185 100644 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug51323_Test.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug51323_Test.java @@ -67,7 +67,7 @@ public final class Bug51323_Test extends ComplexTestCase { protected boolean run(XComponentContext context) throws Throwable { XConnection connection = Connector.create(context).connect(getConnectionDescription()); - XBridgeFactory factory = (XBridgeFactory) UnoRuntime.queryInterface( + XBridgeFactory factory = UnoRuntime.queryInterface( XBridgeFactory.class, context.getServiceManager().createInstanceWithContext( "com.sun.star.bridge.BridgeFactory", context)); diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug92174_Test.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug92174_Test.java index 292dabde4758..13b61447c320 100644 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug92174_Test.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug92174_Test.java @@ -55,7 +55,7 @@ public final class Bug92174_Test extends ComplexTestCase { } protected boolean run(XComponentContext context) throws Throwable { - XTransport t = (XTransport) UnoRuntime.queryInterface( + XTransport t = UnoRuntime.queryInterface( XTransport.class, getBridge(context).getInstance("Transport")); t.setDerived(new XDerived() { public void fn() {} diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug97697_Test.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug97697_Test.java index f235ccfd6475..2fdd457f0dcb 100644 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug97697_Test.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug97697_Test.java @@ -72,7 +72,7 @@ public final class Bug97697_Test extends ComplexTestCase { } protected boolean run(XComponentContext context) throws Throwable { - XTransport transport = (XTransport) UnoRuntime.queryInterface( + XTransport transport = UnoRuntime.queryInterface( XTransport.class, getBridge(context).getInstance("Transport")); try { transport.getAny(); diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug98508_Test.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug98508_Test.java index b713deaa352e..79e373014c4a 100644 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug98508_Test.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug98508_Test.java @@ -76,7 +76,7 @@ public final class Bug98508_Test extends ComplexTestCase { protected boolean run(XComponentContext context) throws Throwable { Test98508Interface ifc - = (Test98508Interface) UnoRuntime.queryInterface( + = UnoRuntime.queryInterface( Test98508Interface.class, getBridge(context).getInstance("")); try { diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/MethodIdTest.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/MethodIdTest.java index c22811502e14..407164c66c7f 100755 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/MethodIdTest.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/MethodIdTest.java @@ -64,7 +64,7 @@ public final class MethodIdTest extends ComplexTestCase { } protected boolean run(XComponentContext context) throws Throwable { - XTest t = (XTest) UnoRuntime.queryInterface( + XTest t = UnoRuntime.queryInterface( XTest.class, getBridge(context).getInstance("Test")); return t.f129() == 129; } diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/PolyStructTest.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/PolyStructTest.java index 2f17041a52fb..1c9e387ddb32 100644 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/PolyStructTest.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/PolyStructTest.java @@ -61,7 +61,7 @@ public final class PolyStructTest extends ComplexTestCase { } protected boolean run(XComponentContext context) throws Throwable { - TestTransport t = (TestTransport) UnoRuntime.queryInterface( + TestTransport t = UnoRuntime.queryInterface( TestTransport.class, getBridge(context).getInstance("")); assertEquals( diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/StopMessageDispatcherTest.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/StopMessageDispatcherTest.java index 7590a89fdd0e..37fb8ffee05b 100644 --- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/StopMessageDispatcherTest.java +++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/StopMessageDispatcherTest.java @@ -63,7 +63,7 @@ public final class StopMessageDispatcherTest extends ComplexTestCase { } protected boolean run(XComponentContext context) throws Throwable { - XTest test = (XTest) UnoRuntime.queryInterface( + XTest test = UnoRuntime.queryInterface( XTest.class, getBridge(context).getInstance("Test")); Thread[] threads = new Thread[101]; int n = Thread.enumerate(threads); diff --git a/bridges/test/java_uno/acquire/TestAcquire.java b/bridges/test/java_uno/acquire/TestAcquire.java index 7d54c00d480d..e219b3adbf72 100644 --- a/bridges/test/java_uno/acquire/TestAcquire.java +++ b/bridges/test/java_uno/acquire/TestAcquire.java @@ -71,7 +71,7 @@ public final class TestAcquire { private static void execClient(XComponentContext context, String url) throws Exception { - XTest test = (XTest) UnoRuntime.queryInterface( + XTest test = UnoRuntime.queryInterface( XTest.class, UnoUrlResolver.create(context).resolve(url)); WaitUnreachable u; @@ -184,7 +184,7 @@ public final class TestAcquire { throws Exception { XAcceptor acceptor = Acceptor.create(context); - XBridgeFactory factory = (XBridgeFactory) UnoRuntime.queryInterface( + XBridgeFactory factory = UnoRuntime.queryInterface( XBridgeFactory.class, context.getServiceManager().createInstanceWithContext( "com.sun.star.bridge.BridgeFactory", context)); diff --git a/bridges/test/java_uno/any/TestRemote.java b/bridges/test/java_uno/any/TestRemote.java index db33efc139e9..ec533054579d 100644 --- a/bridges/test/java_uno/any/TestRemote.java +++ b/bridges/test/java_uno/any/TestRemote.java @@ -49,7 +49,7 @@ public final class TestRemote { } protected boolean run(XComponentContext context) throws Throwable { - XTransport transport = (XTransport) UnoRuntime.queryInterface( + XTransport transport = UnoRuntime.queryInterface( XTransport.class, getBridge(context).getInstance("Transport")); return TestAny.test(transport, true); } diff --git a/bridges/test/java_uno/equals/TestEquals.java b/bridges/test/java_uno/equals/TestEquals.java index 31b735473c9b..38c9500629e3 100644 --- a/bridges/test/java_uno/equals/TestEquals.java +++ b/bridges/test/java_uno/equals/TestEquals.java @@ -91,10 +91,10 @@ public final class TestEquals { } protected boolean run(XComponentContext context) throws Throwable { - XTestFrame f = (XTestFrame) UnoRuntime.queryInterface( + XTestFrame f = UnoRuntime.queryInterface( XTestFrame.class, getBridge(context).getInstance("TestFrame")); XAcceptor acceptor = Acceptor.create(context); - XBridgeFactory factory = (XBridgeFactory) UnoRuntime.queryInterface( + XBridgeFactory factory = UnoRuntime.queryInterface( XBridgeFactory.class, context.getServiceManager().createInstanceWithContext( "com.sun.star.bridge.BridgeFactory", context)); @@ -160,17 +160,15 @@ public final class TestEquals { public void run() { try { Object test1Aa = object1; - XBase test1Ab = (XBase) - UnoRuntime.queryInterface( - XBase.class, test1Aa); - XDerived test1Ac = (XDerived) + XBase test1Ab = UnoRuntime.queryInterface( + XBase.class, test1Aa); + XDerived test1Ac = UnoRuntime.queryInterface( XDerived.class, test1Aa); Object test2Aa = object2; - XBase test2Ab = (XBase) - UnoRuntime.queryInterface( - XBase.class, test2Aa); - XDerived test2Ac = (XDerived) + XBase test2Ab = UnoRuntime.queryInterface( + XBase.class, test2Aa); + XDerived test2Ac = UnoRuntime.queryInterface( XDerived.class, test2Aa); @@ -182,16 +180,14 @@ public final class TestEquals { null, params); XMultiComponentFactory factory = context.getServiceManager(); - XImplementationLoader loader - = (XImplementationLoader) + XImplementationLoader loader = UnoRuntime.queryInterface( XImplementationLoader.class, factory.createInstanceWithContext( "com.sun.star.loader." + "SharedLibrary", context)); - XSingleComponentFactory factory2 - = (XSingleComponentFactory) + XSingleComponentFactory factory2 = UnoRuntime.queryInterface( XSingleComponentFactory.class, loader.activate( @@ -199,7 +195,7 @@ public final class TestEquals { + "testequals.impl", "", "../lib/testequals.uno", null)); - XTestInterface test = (XTestInterface) + XTestInterface test = UnoRuntime.queryInterface( XTestInterface.class, factory2.createInstanceWithContext( @@ -211,17 +207,15 @@ public final class TestEquals { PROTOCOL_DESCRIPTION); Object test1Ba = test.get(INSTANCE1); - XBase test1Bb = (XBase) - UnoRuntime.queryInterface( - XBase.class, test1Ba); - XDerived test1Bc = (XDerived) + XBase test1Bb = UnoRuntime.queryInterface( + XBase.class, test1Ba); + XDerived test1Bc = UnoRuntime.queryInterface( XDerived.class, test1Ba); Object test2Ba = test.get(INSTANCE2); - XBase test2Bb = (XBase) - UnoRuntime.queryInterface( - XBase.class, test2Ba); - XDerived test2Bc = (XDerived) + XBase test2Bb = UnoRuntime.queryInterface( + XBase.class, test2Ba); + XDerived test2Bc = UnoRuntime.queryInterface( XDerived.class, test2Ba); diff --git a/bridges/test/java_uno/nativethreadpool/Relay.java b/bridges/test/java_uno/nativethreadpool/Relay.java index b7e304c4a3c9..03cf6795c596 100644 --- a/bridges/test/java_uno/nativethreadpool/Relay.java +++ b/bridges/test/java_uno/nativethreadpool/Relay.java @@ -63,7 +63,7 @@ public final class Relay implements XRelay, XSource { final XAcceptor acceptor = Acceptor.create(context); final XBridgeFactory factory; try { - factory = (XBridgeFactory) UnoRuntime.queryInterface( + factory = UnoRuntime.queryInterface( XBridgeFactory.class, context.getServiceManager().createInstanceWithContext( "com.sun.star.bridge.BridgeFactory", context)); diff --git a/bridges/test/testclient.java b/bridges/test/testclient.java index 244264fa8686..e1733bbc8b10 100644 --- a/bridges/test/testclient.java +++ b/bridges/test/testclient.java @@ -121,7 +121,7 @@ public class testclient XConnector xConnector = - ( XConnector ) UnoRuntime.queryInterface( XConnector.class , x ); + UnoRuntime.queryInterface( XConnector.class , x ); XConnection xConnection = xConnector.connect(args[0]); @@ -138,7 +138,7 @@ public class testclient System.out.println( "after building bridge" ); // Object rInitialObject = m_bridge.mapInterfaceFrom(rootOid, XInterface.class); -// XTestFactory rFactory = (XTestFactory ) +// XTestFactory rFactory = // UnoRuntime.queryInterface(XTestFactory.class,rInitialObject ); // XCallMe callMerFactory-> |