svn commit: r16903 - trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigAssociation.java

Thomas Neustupny <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: thn
Date: 2009-03-19 13:45:44-0700
New Revision: 16903

Modified:
   trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigAssociation.java

Log:
fix for issue 5727: NPE in FigAssociaton.java (middleGroup is null)

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigAssociation.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigAssociation.java?view=diff&pathrev=16903&r1=16902&r2=16903
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigAssociation.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigAssociation.java	2009-03-19 13:45:44-0700
@@ -573,7 +573,12 @@
      */
     protected void updateNameText() {
         super.updateNameText();
-        middleGroup.calcBounds();
+        // TODO: Without the null check the following throws a NPE so many
+        // times when it is called from FigEdgeModelElement.modelChanged(),
+        // we need to think about it.
+        if (middleGroup != null) {
+            middleGroup.calcBounds();
+        }
     }

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

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.