Author: rahul
Date: Tue Jan 8 11:43:40 2008
New Revision: 610109
URL: http://svn.apache.org/viewvc?rev=610109&view=rev
Log:
Type safety improvements.
Modified:
commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/model/Invoke.java
commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/model/Param.java
Modified:
commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/model/Invoke.java
URL:
http://svn.apache.org/viewvc/commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/model/Invoke.java?rev=610109&r1=610108&r2=610109&view=diff
==============================================================================
---
commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/model/Invoke.java
(original)
+++
commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/model/Invoke.java
Tue Jan 8 11:43:40 2008
@@ -18,6 +18,7 @@
import java.io.Serializable;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -58,12 +59,12 @@
*
* Remove with deprecated getParams() in 1.0
*/
- private Map params;
+ private final Map<String, String> params;
/**
* The List of the params to be sent to the invoked process.
*/
- private List paramsList;
+ private final List<Param> paramsList;
/**
* The <finalize> child, may be null.
@@ -79,14 +80,14 @@
* The current XML namespaces in the SCXML document for this action node,
* preserved for deferred XPath evaluation.
*/
- private Map namespaces;
+ private Map<String, String> namespaces;
/**
* Default no-args constructor for Digester.
*/
public Invoke() {
- params = new HashMap();
- paramsList = new ArrayList();
+ params = Collections.synchronizedMap(new HashMap<String, String>());
+ paramsList = Collections.synchronizedList(new ArrayList<Param>());
}
/**
@@ -151,7 +152,7 @@
* @return Map The params map.
* @deprecated Remove in v1.0, use params() instead
*/
- public final Map getParams() {
+ public final Map<String, String> getParams() {
return params;
}
@@ -160,7 +161,7 @@
*
* @return List The params list.
*/
- public final List params() {
+ public final List<Param> params() {
return paramsList;
}
@@ -215,7 +216,7 @@
*
* @return Returns the map of namespaces.
*/
- public final Map getNamespaces() {
+ public final Map<String, String> getNamespaces() {
return namespaces;
}
@@ -224,7 +225,7 @@
*
* @param namespaces The document namespaces.
*/
- public final void setNamespaces(final Map namespaces) {
+ public final void setNamespaces(final Map<String, String> namespaces) {
this.namespaces = namespaces;
}
Modified:
commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/model/Param.java
URL:
http://svn.apache.org/viewvc/commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/model/Param.java?rev=610109&r1=610108&r2=610109&view=diff
==============================================================================
---
commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/model/Param.java
(original)
+++
commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/model/Param.java
Tue Jan 8 11:43:40 2008
@@ -45,7 +45,7 @@
* The current XML namespaces in the SCXML document for this action node,
* preserved for deferred XPath evaluation.
*/
- private Map namespaces;
+ private Map<String, String> namespaces;
/**
* Default no-args constructor for Digester.
@@ -95,7 +95,7 @@
*
* @return Returns the map of namespaces.
*/
- public final Map getNamespaces() {
+ public final Map<String, String> getNamespaces() {
return namespaces;
}
@@ -104,7 +104,7 @@
*
* @param namespaces The document namespaces.
*/
- public final void setNamespaces(final Map namespaces) {
+ public final void setNamespaces(final Map<String, String> namespaces) {
this.namespaces = namespaces;
}