svn commit: r19134 - trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: thn
Date: 2011-03-25 07:20:04-0700
New Revision: 19134

Modified:
   trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java

Log:
lower type restriction (like in UML1), to make Comments work too

Modified: trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java?view=diff&pathrev=19134&r1=19133&r2=19134
==============================================================================
--- trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java	(original)
+++ trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java	2011-03-25 07:20:04-0700
@@ -469,11 +469,15 @@
     }
 
     public Collection<Dependency> getClientDependencies(Object handle) {
-        if (!(handle instanceof NamedElement)) {
+        // Element is allowed, but only NamedElement can return nonempty list
+        if (!(handle instanceof Element)) {
             throw new IllegalArgumentException(
-                    "handle must be instance of NamedElement"); //$NON-NLS-1$
+                    "handle must be instance of Element"); //$NON-NLS-1$
+        }
+        if (handle instanceof NamedElement) {
+            return ((NamedElement) handle).getClientDependencies();
         }
-        return ((NamedElement) handle).getClientDependencies();
+        return Collections.emptyList();
     }
 
     public Collection<NamedElement> getClients(Object handle) {

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2714145

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.