summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk6
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx1
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_powerpc/uno2cpp.cxx3
-rw-r--r--bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx3
-rw-r--r--bridges/source/cpp_uno/mingw_intel/call.s21
-rw-r--r--bridges/source/cpp_uno/mingw_intel/except.cxx1
-rw-r--r--bridges/source/cpp_uno/mingw_intel/makefile.mk6
-rw-r--r--bridges/source/cpp_uno/mingw_intel/uno2cpp.cxx4
-rw-r--r--bridges/source/jni_uno/jni_java2uno.cxx4
-rw-r--r--bridges/source/jni_uno/jni_uno2java.cxx4
-rw-r--r--bridges/source/jni_uno/makefile.mk6
-rw-r--r--bridges/source/remote/urp/urp_environment.cxx9
-rw-r--r--bridges/test/com/sun/star/lib/TestBed.java4
-rw-r--r--bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug107753_Test.java14
-rw-r--r--bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug108825_Test.java2
-rw-r--r--bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug110892_Test.java2
-rw-r--r--bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug111153_Test.java2
-rw-r--r--bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug51323_Test.java2
-rw-r--r--bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug92174_Test.java2
-rw-r--r--bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug97697_Test.java2
-rw-r--r--bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug98508_Test.java2
-rwxr-xr-xbridges/test/com/sun/star/lib/uno/bridges/java_remote/MethodIdTest.java2
-rw-r--r--bridges/test/com/sun/star/lib/uno/bridges/java_remote/PolyStructTest.java2
-rw-r--r--bridges/test/com/sun/star/lib/uno/bridges/java_remote/StopMessageDispatcherTest.java2
-rw-r--r--bridges/test/java_uno/acquire/TestAcquire.java4
-rw-r--r--bridges/test/java_uno/any/TestRemote.java2
-rw-r--r--bridges/test/java_uno/equals/TestEquals.java40
-rw-r--r--bridges/test/java_uno/nativethreadpool/Relay.java2
-rw-r--r--bridges/test/testclient.java4
29 files changed, 73 insertions, 85 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk
index 32d4b0d27dc9..8371d653a25b 100644
--- a/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk
@@ -61,8 +61,7 @@ CFLAGSNOOPT=-O0
SLOFILES= \
$(SLO)$/cpp2uno.obj \
$(SLO)$/except.obj \
- $(SLO)$/uno2cpp.obj \
- $(SLO)$/m68khelper.obj
+ $(SLO)$/uno2cpp.obj
SHL1TARGET= $(TARGET)
@@ -83,6 +82,3 @@ SHL1STDLIBS= \
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
-
-$(SLO)$/%.obj: %.s
- $(CXX) -c -o $(SLO)$/$(@:b).o $< -fPIC ; touch $@
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx b/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx
index 6141efd7964a..e474dce7268c 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx
@@ -33,6 +33,7 @@
#include "precompiled_bridges.hxx"
#include <stdio.h>
+#include <string.h>
#include <dlfcn.h>
#include <cxxabi.h>
#include <hash_map>
diff --git a/bridges/source/cpp_uno/gcc3_macosx_powerpc/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_macosx_powerpc/uno2cpp.cxx
index 0f0fdbf351ca..e3f4d36e3962 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_powerpc/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_powerpc/uno2cpp.cxx
@@ -110,6 +110,9 @@ static void callVirtualMethod(
/* set up a pointer to the stack parameter area */
__asm__ ( "addi %0,r1,24" : "=r" (p) : /* no inputs */ );
+ // #i94421#, work around compiler error:
+ volatile long * pCopy = p;
+ (void) pCopy; // avoid warning about unused variable
// never called
// if (! pAdjustedThisPtr )CPPU_CURRENT_NAMESPACE::dummy_can_throw_anything("xxx"); // address something
diff --git a/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx
index d4584227cdc1..d6589b8d86cf 100644
--- a/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx
@@ -163,7 +163,8 @@ static typelib_TypeClass cpp2uno_call(
(*pThis->getUnoI()->pDispatcher)(
pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, ">cpp2uno_call pUnoExc %x\n", pUnoExc);
+ if (pUnoExc != NULL)
+ fprintf( stderr, ">cpp2uno_call pUnoExc %x\n", pUnoExc);
#endif
// in case an exception occured...
diff --git a/bridges/source/cpp_uno/mingw_intel/call.s b/bridges/source/cpp_uno/mingw_intel/call.s
index b4a9ba031cf5..47327d9a4650 100644
--- a/bridges/source/cpp_uno/mingw_intel/call.s
+++ b/bridges/source/cpp_uno/mingw_intel/call.s
@@ -1,7 +1,6 @@
.text
.globl _privateSnippetExecutorGeneral
- .type _privateSnippetExecutorGeneral,@function
_privateSnippetExecutorGeneral:
.LFBg:
movl %esp,%ecx
@@ -19,10 +18,9 @@ _privateSnippetExecutorGeneral:
leave
ret
.LFEg:
- .size _privateSnippetExecutorGeneral,.-_privateSnippetExecutorGeneral
+ .long .-_privateSnippetExecutorGeneral
.globl _privateSnippetExecutorVoid
- .type _privateSnippetExecutorVoid,@function
_privateSnippetExecutorVoid:
.LFBv:
movl %esp,%ecx
@@ -38,10 +36,9 @@ _privateSnippetExecutorVoid:
leave
ret
.LFEv:
- .size _privateSnippetExecutorVoid,.-_privateSnippetExecutorVoid
+ .long .-_privateSnippetExecutorVoid
.globl _privateSnippetExecutorHyper
- .type _privateSnippetExecutorHyper,@function
_privateSnippetExecutorHyper:
.LFBh:
movl %esp,%ecx
@@ -60,10 +57,9 @@ _privateSnippetExecutorHyper:
leave
ret
.LFEh:
- .size _privateSnippetExecutorHyper,.-_privateSnippetExecutorHyper
+ .long .-_privateSnippetExecutorHyper
.globl _privateSnippetExecutorFloat
- .type _privateSnippetExecutorFloat,@function
_privateSnippetExecutorFloat:
.LFBf:
movl %esp,%ecx
@@ -81,10 +77,9 @@ _privateSnippetExecutorFloat:
leave
ret
.LFEf:
- .size _privateSnippetExecutorFloat,.-_privateSnippetExecutorFloat
+ .long .-_privateSnippetExecutorFloat
.globl _privateSnippetExecutorDouble
- .type _privateSnippetExecutorDouble,@function
_privateSnippetExecutorDouble:
.LFBd:
movl %esp,%ecx
@@ -102,10 +97,9 @@ _privateSnippetExecutorDouble:
leave
ret
.LFEd:
- .size _privateSnippetExecutorDouble,.-_privateSnippetExecutorDouble
+ .long .-_privateSnippetExecutorDouble
.globl _privateSnippetExecutorClass
- .type _privateSnippetExecutorClass,@function
_privateSnippetExecutorClass:
.LFBc:
movl %esp,%ecx
@@ -123,9 +117,9 @@ _privateSnippetExecutorClass:
leave
ret $4
.LFEc:
- .size _privateSnippetExecutorClass,.-_privateSnippetExecutorClass
+ .long .-_privateSnippetExecutorClass
- .section .eh_frame,"a",@progbits
+ .section .eh_frame,"dr"
.Lframe1:
.long .LECIE1-.LSCIE1 # length
.LSCIE1:
@@ -265,4 +259,3 @@ _privateSnippetExecutorClass:
.uleb128 5
.align 4
.LEFDEc:
- .section .note.GNU-stack,"",@progbits
diff --git a/bridges/source/cpp_uno/mingw_intel/except.cxx b/bridges/source/cpp_uno/mingw_intel/except.cxx
index a529dc00d48b..5285b709b7b5 100644
--- a/bridges/source/cpp_uno/mingw_intel/except.cxx
+++ b/bridges/source/cpp_uno/mingw_intel/except.cxx
@@ -32,6 +32,7 @@
#include "precompiled_bridges.hxx"
#include <stdio.h>
+#include <string.h>
#include <cxxabi.h>
#include <hash_map>
diff --git a/bridges/source/cpp_uno/mingw_intel/makefile.mk b/bridges/source/cpp_uno/mingw_intel/makefile.mk
index 823c3888516b..242d21617d5e 100644
--- a/bridges/source/cpp_uno/mingw_intel/makefile.mk
+++ b/bridges/source/cpp_uno/mingw_intel/makefile.mk
@@ -47,11 +47,17 @@ ENABLE_EXCEPTIONS=TRUE
.IF "$(cppu_no_leak)" == ""
CFLAGS += -DLEAK_STATIC_DATA
.ENDIF
+.IF "$(EXCEPTIONS)" == "sjlj"
+CFLAGS += -DBROKEN_ALLOCA
+.ENDIF
# In case someone enabled the non-standard -fomit-frame-pointer which does not
# work with the .cxx sources in this directory:
CFLAGSCXX += -fno-omit-frame-pointer
+NOOPTFILES= \
+ $(SLO)$/uno2cpp.obj
+
CFLAGSNOOPT=-O0
SLOFILES= \
diff --git a/bridges/source/cpp_uno/mingw_intel/uno2cpp.cxx b/bridges/source/cpp_uno/mingw_intel/uno2cpp.cxx
index 0c12fac5c93f..f6b6a1c6511d 100644
--- a/bridges/source/cpp_uno/mingw_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/mingw_intel/uno2cpp.cxx
@@ -44,10 +44,6 @@
#include "share.hxx"
#include "smallstruct.hxx"
-#ifdef __MINGW32__
-#define BROKEN_ALLOCA
-#endif
-
using namespace ::rtl;
using namespace ::com::sun::star::uno;
diff --git a/bridges/source/jni_uno/jni_java2uno.cxx b/bridges/source/jni_uno/jni_java2uno.cxx
index 03c7ef9fbc64..b3b4e5ab8b06 100644
--- a/bridges/source/jni_uno/jni_java2uno.cxx
+++ b/bridges/source/jni_uno/jni_java2uno.cxx
@@ -41,10 +41,6 @@
#include <algorithm>
-#ifdef __MINGW32__
-#define BROKEN_ALLOCA
-#endif
-
using namespace ::rtl;
namespace jni_uno
diff --git a/bridges/source/jni_uno/jni_uno2java.cxx b/bridges/source/jni_uno/jni_uno2java.cxx
index d9ad7f92b124..50c551427959 100644
--- a/bridges/source/jni_uno/jni_uno2java.cxx
+++ b/bridges/source/jni_uno/jni_uno2java.cxx
@@ -40,10 +40,6 @@
#include "jni_bridge.h"
-#ifdef __MINGW32__
-#define BROKEN_ALLOCA
-#endif
-
using namespace ::std;
using namespace ::rtl;
diff --git a/bridges/source/jni_uno/makefile.mk b/bridges/source/jni_uno/makefile.mk
index 36f6ffbde5b9..d020eb7e91a1 100644
--- a/bridges/source/jni_uno/makefile.mk
+++ b/bridges/source/jni_uno/makefile.mk
@@ -47,6 +47,12 @@ nojava:
# --- Files --------------------------------------------------------
+.IF "$(GUI)$(COM)" == "WNTGCC"
+.IF "$(EXCEPTIONS)" == "sjlj"
+CFLAGS += -DBROKEN_ALLOCA
+.ENDIF
+.ENDIF
+
SLOFILES= \
$(SLO)$/jni_info.obj \
$(SLO)$/jni_data.obj \
diff --git a/bridges/source/remote/urp/urp_environment.cxx b/bridges/source/remote/urp/urp_environment.cxx
index fd0c56ba4376..1afab0633fd4 100644
--- a/bridges/source/remote/urp/urp_environment.cxx
+++ b/bridges/source/remote/urp/urp_environment.cxx
@@ -342,10 +342,13 @@ static void SAL_CALL RemoteEnvironment_thisDispose( uno_Environment *pEnvRemote
pImpl->m_pReader = 0;
}
- ::osl::MutexGuard guard2( ::osl::Mutex::getGlobalMutex() );
- if( ! g_bStaticDestructorsCalled )
+ bool bReleaseStubs = false;
+ {
+ ::osl::MutexGuard guard2( ::osl::Mutex::getGlobalMutex() );
+ bReleaseStubs = !g_bStaticDestructorsCalled;
+ }
+ if( bReleaseStubs )
{
- // delete the stubs
releaseStubs( pEnvRemote );
}
}
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->