commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Heuer (JIRA)" <>
Subject [jira] Created: (SCXML-48) Cannot create more than one subclass of AbstractStateMachine
Date Tue, 26 Jun 2007 16:42:26 GMT
Cannot create more than one subclass of AbstractStateMachine

                 Key: SCXML-48
             Project: Commons SCXML
          Issue Type: Bug
            Reporter: Michael Heuer
         Attachments: abstract-state-machine-test-src.tar.gz

Similar to the issue described in SCXML-47, the following test case will fail:

    public void testMoreThanOneScxmlDocument() throws Exception {
        URL fooScxmlDocument = getClass().getResource("foo.xml");
        URL barScxmlDocument = getClass().getResource("bar.xml");

        Foo foo = new Foo(fooScxmlDocument);
        Bar bar = new Bar(barScxmlDocument);

        // bar's initialstate "bar" never called, since bar's AbstractStateMachine has
        // static reference to stateMachine for foo.xml

    private class Foo extends AbstractStateMachine {

        public Foo(final URL scxmlDocument) {

        public void foo() {
            fooCalled = true;

    private class Bar extends AbstractStateMachine {

        public Bar(final URL scxmlDocument) {

        public void bar() {
            barCalled = true;

with simple SCXML files

<scxml xmlns="" version="1.0" initialstate="foo">
  <state id="foo"/>

<scxml xmlns="" version="1.0" initialstate="bar">
  <state id="bar"/>

    [junit] Running org.apache.commons.scxml.env.EnvTestSuite
java.lang.NoSuchMethodException: org.apache.commons.scxml.env.AbstractStateMachineTest$
        at java.lang.Class.getDeclaredMethod(
        at org.apache.commons.scxml.env.AbstractStateMachine.invoke(
        at org.apache.commons.scxml.env.AbstractStateMachine$EntryListener.onEntry(

Testsuite: org.apache.commons.scxml.env.EnvTestSuite
Tests run: 21, Failures: 2, Errors: 0, Time elapsed: 0.391 sec

Testcase: testMoreThanOneScxmlDocument(org.apache.commons.scxml.env.AbstractStateMachineTest):
        at org.apache.commons.scxml.env.AbstractStateMachineTest.testMoreThanOneScxmlDocument(

Testcase: testStopWatch(org.apache.commons.scxml.env.StopWatchTest):    FAILED
expected:<reset> but was:<foo>
junit.framework.ComparisonFailure: expected:<reset> but was:<foo>
        at org.apache.commons.scxml.env.StopWatchTest.testStopWatch(

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message