commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ra...@apache.org
Subject svn commit: r612303 - /commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/semantics/TransitionTargetComparator.java
Date Tue, 15 Jan 2008 23:16:53 GMT
Author: rahul
Date: Tue Jan 15 15:16:43 2008
New Revision: 612303

URL: http://svn.apache.org/viewvc?rev=612303&view=rev
Log:
Use for-each to reduce clutter.

Modified:
    commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/semantics/TransitionTargetComparator.java

Modified: commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/semantics/TransitionTargetComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/semantics/TransitionTargetComparator.java?rev=612303&r1=612302&r2=612303&view=diff
==============================================================================
--- commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/semantics/TransitionTargetComparator.java
(original)
+++ commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/semantics/TransitionTargetComparator.java
Tue Jan 15 15:16:43 2008
@@ -18,7 +18,6 @@
 
 import java.io.Serializable;
 import java.util.Comparator;
-import java.util.Iterator;
 
 import org.apache.commons.scxml.SCXMLHelper;
 import org.apache.commons.scxml.model.Parallel;
@@ -85,9 +84,8 @@
                 while (parent2.getParent() != lca) {
                     parent2 = parent2.getParent();
                 }
-                for (Iterator iter = lca.getChildren().iterator();
-                        iter.hasNext();) {
-                    State s = (State) iter.next();
+                for (TransitionTarget tt : lca.getChildren()) {
+                    State s = (State) tt;
                     if (s == parent1) {
                         return 1;
                     } else if (s == parent2) {



Mime
View raw message