Author: mvw
Date: 2010-08-12 01:08:19-0700
New Revision: 18636
Modified:
trunk/src/argouml-app/src/org/argouml/notation/providers/MultiplicityNotation.java
trunk/src/argouml-core-model/src/org/argouml/model/Facade.java
Log:
Confirm the assumption of Dave.
Improved comments.
Modified: trunk/src/argouml-app/src/org/argouml/notation/providers/MultiplicityNotation.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/notation/providers/MultiplicityNotation.java?view=diff&pathrev=18636&r1=18635&r2=18636
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/notation/providers/MultiplicityNotation.java (original)
+++ trunk/src/argouml-app/src/org/argouml/notation/providers/MultiplicityNotation.java 2010-08-12 01:08:19-0700
@@ -1,6 +1,6 @@
/* $Id$
*****************************************************************************
- * Copyright (c) 2009 Contributors - see below
+ * Copyright (c) 2009-2010 Contributors - see below
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
*
* Contributors:
* dthompson
+ * mvw
*****************************************************************************
*
* Some portions of this file was previously release using the BSD License:
@@ -63,6 +64,11 @@
// dthompson 29/12/2008: It seems that the returned value is
// irrelevant here, so I assume that the purpose of this call
// is just to throw an exception in case of a problem.
+ /* mvw: Indeed. The intention of the constructor parameter is to prove
+ * that there is a valid UML object to bind the notation to.
+ * So, the next statement should fail on a null parameter,
+ * and on anything that is not an object of which
+ * we can retrieve the multiplicity. */
Model.getFacade().getMultiplicity(multiplicityOwner);
}
Modified: trunk/src/argouml-core-model/src/org/argouml/model/Facade.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model/src/org/argouml/model/Facade.java?view=diff&pathrev=18636&r1=18635&r2=18636
==============================================================================
--- trunk/src/argouml-core-model/src/org/argouml/model/Facade.java (original)
+++ trunk/src/argouml-core-model/src/org/argouml/model/Facade.java 2010-08-12 01:08:19-0700
@@ -2019,7 +2019,8 @@
* StructuralFeature, or TagDefinition.
*
* @param handle
- * model element to retrieve from.
+ * model element to retrieve from.
+ * An exception is thrown if null.
* @return multiplicity
*/
Object getMultiplicity(Object handle);
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2645931
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.