summaryrefslogtreecommitdiff
path: root/jurt
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-02-03 12:13:09 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-02-03 12:13:09 +0000
commitb35b23fdeebf4cfd72d147e1c3ed4041fadaea58 (patch)
tree86f281bf8c545f8d53411608f5764945e0c1c0c1 /jurt
parenta189474f7fc0a2ecffc9292179ad5dc60d130391 (diff)
INTEGRATION: CWS sb10 (1.5.50); FILE MERGED
2003/11/04 14:03:46 sb 1.5.50.1: #112870# Improved robustness by not relying on details of com.sun.star.uno.Type class.
Diffstat (limited to 'jurt')
-rw-r--r--jurt/com/sun/star/uno/AnyConverter.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/jurt/com/sun/star/uno/AnyConverter.java b/jurt/com/sun/star/uno/AnyConverter.java
index 1628d4b43c0d..bb5cf557b2db 100644
--- a/jurt/com/sun/star/uno/AnyConverter.java
+++ b/jurt/com/sun/star/uno/AnyConverter.java
@@ -514,7 +514,13 @@ public class AnyConverter
return object;
break;
case TypeClass.INTERFACE_value:
- if (tc == TypeClass.INTERFACE_value)
+ // Because object is a class, not an interface, it is
+ // controversial what kind of Type "new Type(object.class)"
+ // above should return (UNKNOWN or INTERFACE), so that we should
+ // not check here for "tc == TypeClass.INTERFACE_value".
+ // Instead, we check whether object (indirectly) derives from
+ // XInterface:
+ if (object instanceof XInterface)
return UnoRuntime.queryInterface( destType, object );
break;
case TypeClass.STRUCT_value: