You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ra...@apache.org on 2008/01/09 22:47:15 UTC

svn commit: r610583 - in /commons/proper/scxml/branches/J5/src/test/java/org/apache/commons/scxml/model: CustomActionTest.java DatamodelTest.java Hello.java

Author: rahul
Date: Wed Jan  9 13:46:42 2008
New Revision: 610583

URL: http://svn.apache.org/viewvc?rev=610583&view=rev
Log:
Improve type safety in tests.

Modified:
    commons/proper/scxml/branches/J5/src/test/java/org/apache/commons/scxml/model/CustomActionTest.java
    commons/proper/scxml/branches/J5/src/test/java/org/apache/commons/scxml/model/DatamodelTest.java
    commons/proper/scxml/branches/J5/src/test/java/org/apache/commons/scxml/model/Hello.java

Modified: commons/proper/scxml/branches/J5/src/test/java/org/apache/commons/scxml/model/CustomActionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J5/src/test/java/org/apache/commons/scxml/model/CustomActionTest.java?rev=610583&r1=610582&r2=610583&view=diff
==============================================================================
--- commons/proper/scxml/branches/J5/src/test/java/org/apache/commons/scxml/model/CustomActionTest.java (original)
+++ commons/proper/scxml/branches/J5/src/test/java/org/apache/commons/scxml/model/CustomActionTest.java Wed Jan  9 13:46:42 2008
@@ -161,7 +161,7 @@
         CustomAction ca2 =
             new CustomAction("http://my.custom-actions.domain/CUSTOM2",
                              "bar", Hello.class);
-        List customActions = new ArrayList();
+        List<CustomAction> customActions = new ArrayList<CustomAction>();
         customActions.add(ca1);
         customActions.add(ca2);
         // (2) Parse the document with a custom digester.
@@ -182,7 +182,7 @@
         CustomAction ca =
             new CustomAction("http://my.custom-actions.domain/CUSTOM",
                              "hello", Hello.class);
-        List customActions = new ArrayList();
+        List<CustomAction> customActions = new ArrayList<CustomAction>();
         customActions.add(ca);
         // (2) Parse the document with a custom digester.
         SCXML scxml = SCXMLTestHelper.digest(external01, customActions);
@@ -200,7 +200,7 @@
         CustomAction ca =
             new CustomAction("http://my.custom-actions.domain/CUSTOM",
                              "send", Hello.class);
-        List customActions = new ArrayList();
+        List<CustomAction> customActions = new ArrayList<CustomAction>();
         customActions.add(ca);
         // (2) Parse the document with a custom digester.
         SCXML scxml = SCXMLTestHelper.digest(override01, customActions);
@@ -225,7 +225,7 @@
         CustomAction ca =
             new CustomAction("http://my.custom-actions.domain/CUSTOM",
                              "hello", Hello.class);
-        List customActions = new ArrayList();
+        List<CustomAction> customActions = new ArrayList<CustomAction>();
         customActions.add(ca);
         // (2) Parse the document with a custom digester.
         SCXML scxml = SCXMLTestHelper.digest(payload01, customActions);
@@ -257,7 +257,7 @@
         CustomAction ca =
             new CustomAction("http://my.custom-actions.domain/CUSTOM",
                              "hello", Hello.class);
-        List customActions = new ArrayList();
+        List<CustomAction> customActions = new ArrayList<CustomAction>();
         customActions.add(ca);
         // (2) Parse the document with a custom digester.
         SCXML scxml = SCXMLTestHelper.digest(payload02, customActions);

Modified: commons/proper/scxml/branches/J5/src/test/java/org/apache/commons/scxml/model/DatamodelTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J5/src/test/java/org/apache/commons/scxml/model/DatamodelTest.java?rev=610583&r1=610582&r2=610583&view=diff
==============================================================================
--- commons/proper/scxml/branches/J5/src/test/java/org/apache/commons/scxml/model/DatamodelTest.java (original)
+++ commons/proper/scxml/branches/J5/src/test/java/org/apache/commons/scxml/model/DatamodelTest.java Wed Jan  9 13:46:42 2008
@@ -122,7 +122,7 @@
         assertEquals(1, currentStates.size());
         assertEquals("ten", ((State)currentStates.iterator().
             next()).getId());
-        Map payload = new HashMap();
+        Map<String, Object> payload = new HashMap<String, Object>();
         payload.put("one", "1");
         payload.put("two", "2");
         TriggerEvent te = new TriggerEvent("ten.done", TriggerEvent.SIGNAL_EVENT, payload);

Modified: commons/proper/scxml/branches/J5/src/test/java/org/apache/commons/scxml/model/Hello.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J5/src/test/java/org/apache/commons/scxml/model/Hello.java?rev=610583&r1=610582&r2=610583&view=diff
==============================================================================
--- commons/proper/scxml/branches/J5/src/test/java/org/apache/commons/scxml/model/Hello.java (original)
+++ commons/proper/scxml/branches/J5/src/test/java/org/apache/commons/scxml/model/Hello.java Wed Jan  9 13:46:42 2008
@@ -63,9 +63,10 @@
     /**
      * @inheritDoc
      */
+    @Override
     public void execute(final EventDispatcher evtDispatcher,
             final ErrorReporter errRep, final SCInstance scInstance,
-            final Log appLog, final Collection derivedEvents)
+            final Log appLog, final Collection<TriggerEvent> derivedEvents)
     throws ModelException, SCXMLExpressionException {
         if (appLog.isInfoEnabled()) {
             appLog.info("Hello " + name);