summaryrefslogtreecommitdiff
path: root/ridljar/com/sun
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-01-26 16:41:46 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-01-26 16:41:46 +0000
commit05b23d11e2ef0bf8d7894a606cd1a3f541e76344 (patch)
treead3a008f8cb73d27bc7f50dabd430e25079b2af2 /ridljar/com/sun
parente49c2a02ac2442990b0b7d16985d90229914e829 (diff)
INTEGRATION: CWS sb46 (1.8.8); FILE MERGED
2006/01/13 11:53:22 sb 1.8.8.1: #i60341# Enforce that an Any does not wrap another Any.
Diffstat (limited to 'ridljar/com/sun')
-rw-r--r--ridljar/com/sun/star/uno/Any.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/ridljar/com/sun/star/uno/Any.java b/ridljar/com/sun/star/uno/Any.java
index 2c55da496..76425a73e 100644
--- a/ridljar/com/sun/star/uno/Any.java
+++ b/ridljar/com/sun/star/uno/Any.java
@@ -4,9 +4,9 @@
*
* $RCSfile: Any.java,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: rt $ $Date: 2005-09-08 13:21:32 $
+ * last change: $Author: hr $ $Date: 2006-01-26 17:41:46 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -46,7 +46,7 @@ package com.sun.star.uno;
* an explicit interface type, so the remote counterpart doesn't need to invoke
* a queryInterface).
* <p>
- * @version $Revision: 1.8 $ $ $Date: 2005-09-08 13:21:32 $
+ * @version $Revision: 1.9 $ $ $Date: 2006-01-26 17:41:46 $
*/
public class Any {
/**
@@ -76,8 +76,7 @@ public class Any {
* @deprecated as of UDK 2.0
*/
public Any(Class zInterface, Object object) {
- _type = new Type(zInterface);
- _object = object;
+ this(new Type(zInterface), object);
}
/** Constructs a new any with a given type and value
@@ -85,6 +84,9 @@ public class Any {
@param object the value of the any.
*/
public Any(Type type, Object object) {
+ if (type.equals(Type.ANY)) {
+ throw new IllegalArgumentException("Any cannot contain Any");
+ }
_type = type;
_object = object;
}