You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by at...@apache.org on 2014/02/15 22:36:32 UTC
svn commit: r1568687 - in /commons/proper/scxml/trunk/src:
main/java/org/apache/commons/scxml2/io/
main/java/org/apache/commons/scxml2/model/
test/java/org/apache/commons/scxml2/model/
Author: ate
Date: Sat Feb 15 21:36:31 2014
New Revision: 1568687
URL: http://svn.apache.org/r1568687
Log:
SCXML-193: drop non-function exit element
Removed:
commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/model/Exit.java
Modified:
commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/io/SCXMLReader.java
commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/io/SCXMLWriter.java
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/ActionsTest.java
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/actions-initial-test.xml
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/actions-parallel-test.xml
commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/actions-state-test.xml
Modified: commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/io/SCXMLReader.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/io/SCXMLReader.java?rev=1568687&r1=1568686&r2=1568687&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/io/SCXMLReader.java (original)
+++ commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/io/SCXMLReader.java Sat Feb 15 21:36:31 2014
@@ -63,7 +63,6 @@ import org.apache.commons.scxml2.model.E
import org.apache.commons.scxml2.model.ElseIf;
import org.apache.commons.scxml2.model.Raise;
import org.apache.commons.scxml2.model.Executable;
-import org.apache.commons.scxml2.model.Exit;
import org.apache.commons.scxml2.model.ExternalContent;
import org.apache.commons.scxml2.model.Final;
import org.apache.commons.scxml2.model.Finalize;
@@ -224,7 +223,6 @@ public final class SCXMLReader {
private static final String ELEM_ELSE = "else";
private static final String ELEM_ELSEIF = "elseif";
private static final String ELEM_RAISE = "raise";
- private static final String ELEM_EXIT = "exit";
private static final String ELEM_FINAL = "final";
private static final String ELEM_FINALIZE = "finalize";
private static final String ELEM_HISTORY = "history";
@@ -1479,8 +1477,6 @@ public final class SCXMLReader {
} else if (XMLNS_COMMONS_SCXML.equals(nsURI)) {
if (ELEM_VAR.equals(name)) {
readVar(reader, configuration, tt, executable, parent);
- } else if (ELEM_EXIT.equals(name)) {
- readExit(reader, configuration, tt, executable, parent);
} else {
reportIgnoredElement(reader, configuration, end, nsURI, name);
}
@@ -1897,33 +1893,6 @@ public final class SCXMLReader {
}
- // TODO Remove <exit> support
- /**
- * Read the contents of this <exit> element.
- *
- * @param reader The {@link XMLStreamReader} providing the SCXML document to parse.
- * @param configuration The {@link Configuration} to use while parsing.
- * @param tt The parent {@link TransitionTarget} for this action.
- * @param executable The parent {@link Executable} for this action.
- * @param parent The optional parent {@link ActionsContainer} if this action is a child of one.
- *
- * @throws XMLStreamException An exception processing the underlying {@link XMLStreamReader}.
- */
- private static void readExit(final XMLStreamReader reader, final Configuration configuration,
- final TransitionTarget tt, final Executable executable, final ActionsContainer parent)
- throws XMLStreamException {
-
- Exit exit = new Exit();
- readNamespaces(configuration, exit);
- exit.setParent(executable);
- if (parent != null) {
- parent.addAction(exit);
- } else {
- executable.addAction(exit);
- }
-
- }
-
/**
* Read the contents of this custom action.
*
Modified: commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/io/SCXMLWriter.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/io/SCXMLWriter.java?rev=1568687&r1=1568686&r2=1568687&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/io/SCXMLWriter.java (original)
+++ commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/io/SCXMLWriter.java Sat Feb 15 21:36:31 2014
@@ -51,7 +51,6 @@ import org.apache.commons.scxml2.model.D
import org.apache.commons.scxml2.model.Else;
import org.apache.commons.scxml2.model.ElseIf;
import org.apache.commons.scxml2.model.Raise;
-import org.apache.commons.scxml2.model.Exit;
import org.apache.commons.scxml2.model.ExternalContent;
import org.apache.commons.scxml2.model.Final;
import org.apache.commons.scxml2.model.Finalize;
@@ -135,7 +134,6 @@ public class SCXMLWriter {
private static final String ELEM_ELSE = "else";
private static final String ELEM_ELSEIF = "elseif";
private static final String ELEM_RAISE = "raise";
- private static final String ELEM_EXIT = "exit";
private static final String ELEM_FINAL = "final";
private static final String ELEM_FINALIZE = "finalize";
private static final String ELEM_HISTORY = "history";
@@ -830,12 +828,6 @@ public class SCXMLWriter {
writeAV(writer, ATTR_NAME, v.getName());
writeAV(writer, ATTR_EXPR, SCXMLHelper.escapeXML(v.getExpr()));
writer.writeEndElement();
- } else if (a instanceof Exit) {
- Exit e = (Exit) a;
- writer.writeStartElement(XMLNS_COMMONS_SCXML, ELEM_EXIT);
- writeAV(writer, ATTR_EXPR, SCXMLHelper.escapeXML(e.getExpr()));
- writeAV(writer, ATTR_NAMELIST, e.getNamelist());
- writer.writeEndElement();
} else {
writer.writeComment("Custom action with class name '" + a.getClass().getName() + "' not serialized");
}
Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/ActionsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/ActionsTest.java?rev=1568687&r1=1568686&r2=1568687&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/ActionsTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/ActionsTest.java Sat Feb 15 21:36:31 2014
@@ -31,7 +31,6 @@ import org.junit.Test;
* Unit tests {@link org.apache.commons.scxml2.model.Cancel}.
* Unit tests {@link org.apache.commons.scxml2.model.Else}.
* Unit tests {@link org.apache.commons.scxml2.model.ElseIf}.
- * Unit tests {@link org.apache.commons.scxml2.model.Exit}.
* Unit tests {@link org.apache.commons.scxml2.model.If}.
* Unit tests {@link org.apache.commons.scxml2.model.Log}.
* Unit tests {@link org.apache.commons.scxml2.model.Send}.
Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/actions-initial-test.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/actions-initial-test.xml?rev=1568687&r1=1568686&r2=1568687&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/actions-initial-test.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/actions-initial-test.xml Sat Feb 15 21:36:31 2014
@@ -41,8 +41,6 @@
<cancel sendId="send12345"/>
<log expr="leaving" label="entry001" />
<raise event="event.test"/>
- <!-- exit will be ignored, makes little sense in initial -->
- <cs:exit expr="later" namelist="freddy" />
</transition>
</initial>
Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/actions-parallel-test.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/actions-parallel-test.xml?rev=1568687&r1=1568686&r2=1568687&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/actions-parallel-test.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/actions-parallel-test.xml Sat Feb 15 21:36:31 2014
@@ -40,7 +40,6 @@
<cancel sendId="send12345"/>
<log expr="leaving" label="entry001" />
<raise event="event.test"/>
- <cs:exit expr="later" namelist="freddy" />
</onentry>
<transition event="event.test">
Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/actions-state-test.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/actions-state-test.xml?rev=1568687&r1=1568686&r2=1568687&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/actions-state-test.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/actions-state-test.xml Sat Feb 15 21:36:31 2014
@@ -40,7 +40,6 @@
<cancel sendId="send12345"/>
<log expr="leaving" label="entry001" />
<raise event="event.test"/>
- <cs:exit expr="later" namelist="freddy" />
</onentry>
<transition event="event.test">