commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r730827 - in /commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml: SCXMLExecutor.java SCXMLHelper.java io/ModelUpdater.java semantics/SCXMLSemanticsImpl.java
Date Fri, 02 Jan 2009 19:21:03 GMT
Author: sebb
Date: Fri Jan  2 11:21:02 2009
New Revision: 730827

URL: http://svn.apache.org/viewvc?rev=730827&view=rev
Log:
Remove unnecessary casts

Modified:
    commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/SCXMLExecutor.java
    commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/SCXMLHelper.java
    commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/io/ModelUpdater.java
    commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/semantics/SCXMLSemanticsImpl.java

Modified: commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/SCXMLExecutor.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/SCXMLExecutor.java?rev=730827&r1=730826&r2=730827&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/SCXMLExecutor.java
(original)
+++ commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/SCXMLExecutor.java
Fri Jan  2 11:21:02 2009
@@ -487,8 +487,7 @@
         currentStatus = step.getAfterStatus();
         scInstance.getRootContext().setLocal("_ALL_STATES",
             SCXMLHelper.getAncestorClosure(currentStatus.getStates(), null));
-        setEventData((TriggerEvent[]) currentStatus.getEvents().
-            toArray(new TriggerEvent[0]));
+        setEventData(currentStatus.getEvents().toArray(new TriggerEvent[0]));
     }
 
     /**

Modified: commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/SCXMLHelper.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/SCXMLHelper.java?rev=730827&r1=730826&r2=730827&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/SCXMLHelper.java
(original)
+++ commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/SCXMLHelper.java
Fri Jan  2 11:21:02 2009
@@ -229,7 +229,7 @@
         if (t.getTargets().size() == 0) {
             return allStates;
         }
-        Path p = (Path) t.getPaths().get(0); // all paths have same upseg
+        Path p = t.getPaths().get(0); // all paths have same upseg
         //the easy part
         allStates.addAll(p.getUpwardSegment());
         TransitionTarget source = t.getParent();

Modified: commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/io/ModelUpdater.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/io/ModelUpdater.java?rev=730827&r1=730826&r2=730827&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/io/ModelUpdater.java
(original)
+++ commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/io/ModelUpdater.java
Fri Jan  2 11:21:02 2009
@@ -59,8 +59,7 @@
        String initial = scxml.getInitial();
        //we have to use getTargets() here since the initialTarget can be
        //an indirect descendant
-       TransitionTarget initialTarget = (TransitionTarget) scxml.getTargets().
-           get(initial);
+       TransitionTarget initialTarget = scxml.getTargets().get(initial);
        if (initialTarget == null) {
            // Where do we, where do we go?
            logAndThrowModelError(ERR_SCXML_NO_INIT, new Object[] {

Modified: commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/semantics/SCXMLSemanticsImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/semantics/SCXMLSemanticsImpl.java?rev=730827&r1=730826&r2=730827&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/semantics/SCXMLSemanticsImpl.java
(original)
+++ commons/proper/scxml/branches/J6/src/main/java/org/apache/commons/scxml/semantics/SCXMLSemanticsImpl.java
Fri Jan  2 11:21:02 2009
@@ -150,7 +150,7 @@
             //set of ALL entered states (even if initialState is a jump-over)
             Set<TransitionTarget> onEntry = SCXMLHelper.getAncestorClosure(targets,
null);
             // sort onEntry according state hierarchy
-            TransitionTarget[] oen = (TransitionTarget[]) onEntry.toArray(TT_ARR0);
+            TransitionTarget[] oen = onEntry.toArray(TT_ARR0);
             onEntry.clear();
             Arrays.sort(oen, getTTComparator());
             // we need to impose reverse order for the onEntry list
@@ -426,7 +426,7 @@
         // only if there are multiple enabled transitions
         if (step.getTransitList().size() > 1) {
             // global transition precedence check
-            Transition[] trans = (Transition[]) step.getTransitList().toArray(TR_ARR0);
+            Transition[] trans = step.getTransitList().toArray(TR_ARR0);
             // non-determinism candidates
             Set<Transition> nonDeterm = new LinkedHashSet<Transition>();
             for (int i = 0; i < trans.length; i++) {
@@ -676,9 +676,9 @@
             throw new ModelException("Illegal state machine configuration!");
         }
         // sort onEntry and onExit according state hierarchy
-        TransitionTarget[] oex = (TransitionTarget[]) exitedStates.toArray(TT_ARR0);
+        TransitionTarget[] oex = exitedStates.toArray(TT_ARR0);
         exitedStates.clear();
-        TransitionTarget[] oen = (TransitionTarget[]) entered.toArray(TT_ARR0);
+        TransitionTarget[] oen = entered.toArray(TT_ARR0);
         entered.clear();
         Arrays.sort(oex, getTTComparator());
         Arrays.sort(oen, getTTComparator());



Mime
View raw message