svn commit: r16524 - trunk/src/argouml-app/src/org/argouml/ui/explorer/ExplorerTreeModel.java

Bob Tarling <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2009-01-05 10:47:45-0800
New Revision: 16524

Modified:
   trunk/src/argouml-app/src/org/argouml/ui/explorer/ExplorerTreeModel.java

Log:
Issue 5585: Create a copy of the iterated collection to make sure against concurrent modification.

Modified: trunk/src/argouml-app/src/org/argouml/ui/explorer/ExplorerTreeModel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/explorer/ExplorerTreeModel.java?view=diff&pathrev=16524&r1=16523&r2=16524
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/ui/explorer/ExplorerTreeModel.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/ui/explorer/ExplorerTreeModel.java	2009-01-05 10:47:45-0800
@@ -247,7 +247,8 @@
      * @see org.argouml.ui.explorer.TreeModelUMLEventListener#modelElementRemoved(java.lang.Object)
      */
     public void modelElementRemoved(Object node) {
-        for (ExplorerTreeNode changeNode : findNodes(node)) {
+        for (ExplorerTreeNode changeNode
+                : new ArrayList<ExplorerTreeNode>(findNodes(node))) {
             if (changeNode.getParent() != null) {
                 removeNodeFromParent(changeNode);
             }

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

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.