summaryrefslogtreecommitdiff
path: root/jurt
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2005-09-23 10:50:30 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2005-09-23 10:50:30 +0000
commit09db6141a38dffa6a03495015c25decddd7f572b (patch)
tree237aa9e4d6b5cefc1c0391a75473d1befe3dc345 /jurt
parentadc976a427ea243cfe59d7584d552185f777742d (diff)
INTEGRATION: CWS jl16 (1.41.6); FILE MERGED
2005/08/22 08:56:15 sb 1.41.6.1: #i52831# Added comments explaining why the hack to fix this error in the bean module works.
Diffstat (limited to 'jurt')
-rw-r--r--jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java21
1 files changed, 18 insertions, 3 deletions
diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java
index ba79eb5effaa..226fbaf6d7a7 100644
--- a/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java
+++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java
@@ -4,9 +4,9 @@
*
* $RCSfile: java_remote_bridge.java,v $
*
- * $Revision: 1.42 $
+ * $Revision: 1.43 $
*
- * last change: $Author: rt $ $Date: 2005-09-07 18:58:04 $
+ * last change: $Author: hr $ $Date: 2005-09-23 11:50:30 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -101,7 +101,7 @@ import com.sun.star.uno.Any;
* The protocol to used is passed by name, the bridge
* then looks for it under <code>com.sun.star.lib.uno.protocols</code>.
* <p>
- * @version $Revision: 1.42 $ $ $Date: 2005-09-07 18:58:04 $
+ * @version $Revision: 1.43 $ $ $Date: 2005-09-23 11:50:30 $
* @author Kay Ramme
* @since UDK1.0
*/
@@ -556,6 +556,21 @@ public class java_remote_bridge
String[] oid = new String[1];
object = _java_environment.registerInterface(object, oid, type);
if (!proxyFactory.isProxy(object)) {
+ // This branch must be taken iff object either is no proxy at
+ // all or a proxy from some other bridge. There are objects
+ // that behave like objects for this bridge but that are not
+ // detected as such by proxyFactory.isProxy. The only known
+ // case of such objects is com.sun.star.comp.beans.Wrapper,
+ // which implements com.sun.star.lib.uno.Proxy and effectively
+ // is a second proxy around a proxy that can be from this
+ // bridge. For that case, there is no problem, however: Since
+ // the proxies generated by ProxyFactory send each
+ // queryInterface to the original object (i.e., they do not
+ // short-circuit requests for a super-interface to themselves),
+ // there will always be an appropriate ProxyFactory-proxy
+ // registered at the _java_environment, so that the object
+ // returned by _java_environment.registerInterface will never be
+ // a com.sun.star.comp.beans.Wrapper.
addRefHolder(object, type, oid[0]);
}
return oid[0];