Author: tfmorris
Date: 2007-08-06 14:47:20-0700
New Revision: 13257
Modified:
trunk/src/model-mdr/src/org/argouml/model/mdr/CommonBehaviorHelperMDRImpl.java
trunk/src/model-mdr/src/org/argouml/model/mdr/ModelEventPumpMDRImpl.java
Log:
Remove uses of Vector not required by API.
Modified: trunk/src/model-mdr/src/org/argouml/model/mdr/CommonBehaviorHelperMDRImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model-mdr/src/org/argouml/model/mdr/CommonBehaviorHelperMDRImpl.java?view=diff&rev=13257&p1=trunk/src/model-mdr/src/org/argouml/model/mdr/CommonBehaviorHelperMDRImpl.java&p2=trunk/src/model-mdr/src/org/argouml/model/mdr/CommonBehaviorHelperMDRImpl.java&r1=13256&r2=13257
==============================================================================
--- trunk/src/model-mdr/src/org/argouml/model/mdr/CommonBehaviorHelperMDRImpl.java (original)
+++ trunk/src/model-mdr/src/org/argouml/model/mdr/CommonBehaviorHelperMDRImpl.java 2007-08-06 14:47:20-0700
@@ -24,6 +24,7 @@
package org.argouml.model.mdr;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
@@ -332,16 +333,13 @@
if (handle instanceof Signal) {
Collection actualContexts = Model.getFacade().getContexts(handle);
if (!actualContexts.isEmpty()) {
- Vector contexts = new Vector();
- contexts.addAll(actualContexts);
- Iterator toRemove = contexts.iterator();
- while (toRemove.hasNext())
- removeContext(handle, toRemove.next());
- }
- if (!c.isEmpty()) {
- Iterator toAdd = c.iterator();
- while (toAdd.hasNext())
- addContext(handle, toAdd.next());
+ Collection contexts = new ArrayList(actualContexts);
+ for (Object context : contexts) {
+ removeContext(handle, context);
+ }
+ }
+ for (Object context : c) {
+ addContext(handle, context);
}
return;
}
@@ -420,16 +418,13 @@
Collection actualReceptions =
Model.getFacade().getReceptions(handle);
if (!actualReceptions.isEmpty()) {
- Vector receptions = new Vector();
- receptions.addAll(actualReceptions);
- Iterator toRemove = receptions.iterator();
- while (toRemove.hasNext())
- removeReception(handle, toRemove.next());
- }
- if (!c.isEmpty()) {
- Iterator toAdd = c.iterator();
- while (toAdd.hasNext())
- addReception(handle, toAdd.next());
+ Collection receptions = new ArrayList(actualReceptions);
+ for (Object reception : receptions) {
+ removeReception(handle, reception);
+ }
+ }
+ for (Object reception : c) {
+ addReception(handle, reception);
}
return;
}
Modified: trunk/src/model-mdr/src/org/argouml/model/mdr/ModelEventPumpMDRImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model-mdr/src/org/argouml/model/mdr/ModelEventPumpMDRImpl.java?view=diff&rev=13257&p1=trunk/src/model-mdr/src/org/argouml/model/mdr/ModelEventPumpMDRImpl.java&p2=trunk/src/model-mdr/src/org/argouml/model/mdr/ModelEventPumpMDRImpl.java&r1=13256&r2=13257
==============================================================================
--- trunk/src/model-mdr/src/org/argouml/model/mdr/ModelEventPumpMDRImpl.java (original)
+++ trunk/src/model-mdr/src/org/argouml/model/mdr/ModelEventPumpMDRImpl.java 2007-08-06 14:47:20-0700
@@ -34,7 +34,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.Vector;
import javax.jmi.model.Association;
import javax.jmi.model.AssociationEnd;
@@ -235,7 +234,7 @@
return;
}
- Vector events = new Vector();
+ List events = new ArrayList();
if (mdrEvent instanceof AttributeEvent) {
AttributeEvent ae = (AttributeEvent) mdrEvent;
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.