svn commit: r16530 - trunk/src/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java

Michiel van der Wulp <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: mvw
Date: 2009-01-06 07:47:43-0800
New Revision: 16530

Modified:
   trunk/src/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java

Log:
Fix exceptions when multiplicities are undefined.
Sorry, no time to enter an issue for this.

Modified: trunk/src/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java?view=diff&pathrev=16530&r1=16529&r2=16530
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java	2009-01-06 07:47:43-0800
@@ -1234,11 +1234,15 @@
         } else {
             throw new IllegalArgumentException();
         }
-        int upper = Model.getFacade().getUpper(multiplicity);
-        int lower = Model.getFacade().getLower(multiplicity);
-        if (lower != 1 || upper != 1 || showSingularMultiplicity) {
-            // TODO: I18N
-            return Model.getFacade().toString(multiplicity);
+        // it can still be null if the UML element 
+        // did not have a multiplicity defined.
+        if (multiplicity != null) {
+            int upper = Model.getFacade().getUpper(multiplicity);
+            int lower = Model.getFacade().getLower(multiplicity);
+            if (lower != 1 || upper != 1 || showSingularMultiplicity) {
+                // TODO: I18N
+                return Model.getFacade().toString(multiplicity);
+            }
         }
         return "";
     }

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

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.