commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ra...@apache.org
Subject svn commit: r351532 - /jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/semantics/SCXMLSemanticsImpl.java
Date Fri, 02 Dec 2005 00:12:26 GMT
Author: rahul
Date: Thu Dec  1 16:12:22 2005
New Revision: 351532

URL: http://svn.apache.org/viewcvs?rev=351532&view=rev
Log:
Treat a NFE as an "immediate" send.

Modified:
    jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/semantics/SCXMLSemanticsImpl.java

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/semantics/SCXMLSemanticsImpl.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/semantics/SCXMLSemanticsImpl.java?rev=351532&r1=351531&r2=351532&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/semantics/SCXMLSemanticsImpl.java
(original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/semantics/SCXMLSemanticsImpl.java
Thu Dec  1 16:12:22 2005
@@ -249,9 +249,19 @@
                         params.put(varName, varObj);
                     }
                 }
+                String delay = snd.getDelay();
+                long wait = 0L;
+                if (delay != null && delay.length() > 0) {
+                    try {
+                        wait = Long.parseLong(delay.trim());
+                    } catch (NumberFormatException nfe) {
+                        APP_LOG.warn("Could not parse delay for <send>, "
+                            + "it will be treated as immediate", nfe);
+                    }
+                }
                 evtDispatcher.send(snd.getSendid(),
                         snd.getTarget(), snd.getTargettype(), snd.getEvent(),
-                        params, hints, Long.parseLong(snd.getDelay()));
+                        params, hints, wait);
             } else if (a instanceof Var) {
                 Var vr = (Var) a;
                 String varName = vr.getName();



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message