You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by cr...@apache.org on 2001/01/07 23:43:30 UTC
cvs commit: jakarta-struts/src/share/org/apache/struts/digester SetPropertiesRule.java SetPropertyRule.java
craigmcc 01/01/07 14:43:30
Modified: src/share/org/apache/struts/digester SetPropertiesRule.java
SetPropertyRule.java
Log:
Update these digester rules to pass a HashMap instead of a Hashtable for
the accumulated properties to be set. Since this is a local variable and
not accessible to other threads, no synchronization is required and this
code will run slightly faster.
Revision Changes Path
1.3 +6 -6 jakarta-struts/src/share/org/apache/struts/digester/SetPropertiesRule.java
Index: SetPropertiesRule.java
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/digester/SetPropertiesRule.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SetPropertiesRule.java 2000/08/01 20:03:29 1.2
+++ SetPropertiesRule.java 2001/01/07 22:43:30 1.3
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/digester/SetPropertiesRule.java,v 1.2 2000/08/01 20:03:29 craigmcc Exp $
- * $Revision: 1.2 $
- * $Date: 2000/08/01 20:03:29 $
+ * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/digester/SetPropertiesRule.java,v 1.3 2001/01/07 22:43:30 craigmcc Exp $
+ * $Revision: 1.3 $
+ * $Date: 2001/01/07 22:43:30 $
*
* ====================================================================
*
@@ -63,7 +63,7 @@
package org.apache.struts.digester;
-import java.util.Hashtable;
+import java.util.HashMap;
import org.xml.sax.AttributeList;
import org.apache.struts.util.BeanUtils;
@@ -73,7 +73,7 @@
* stack, based on attributes with corresponding names.
*
* @author Craig McClanahan
- * @version $Revision: 1.2 $ $Date: 2000/08/01 20:03:29 $
+ * @version $Revision: 1.3 $ $Date: 2001/01/07 22:43:30 $
*/
public final class SetPropertiesRule extends Rule {
@@ -106,7 +106,7 @@
public void begin(AttributeList attributes) throws Exception {
// Build a set of attribute names and corresponding values
- Hashtable values = new Hashtable();
+ HashMap values = new HashMap();
for (int i = 0; i < attributes.getLength(); i++) {
String name = attributes.getName(i);
String value = attributes.getValue(i);
1.3 +6 -6 jakarta-struts/src/share/org/apache/struts/digester/SetPropertyRule.java
Index: SetPropertyRule.java
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/digester/SetPropertyRule.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SetPropertyRule.java 2000/08/01 20:03:29 1.2
+++ SetPropertyRule.java 2001/01/07 22:43:30 1.3
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/digester/SetPropertyRule.java,v 1.2 2000/08/01 20:03:29 craigmcc Exp $
- * $Revision: 1.2 $
- * $Date: 2000/08/01 20:03:29 $
+ * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/digester/SetPropertyRule.java,v 1.3 2001/01/07 22:43:30 craigmcc Exp $
+ * $Revision: 1.3 $
+ * $Date: 2001/01/07 22:43:30 $
*
* ====================================================================
*
@@ -63,7 +63,7 @@
package org.apache.struts.digester;
-import java.util.Hashtable;
+import java.util.HashMap;
import org.xml.sax.AttributeList;
import org.apache.struts.util.BeanUtils;
@@ -73,7 +73,7 @@
* top of the stack, based on attributes with specified names.
*
* @author Craig McClanahan
- * @version $Revision: 1.2 $ $Date: 2000/08/01 20:03:29 $
+ * @version $Revision: 1.3 $ $Date: 2001/01/07 22:43:30 $
*/
public final class SetPropertyRule extends Rule {
@@ -130,7 +130,7 @@
// Identify the actual property name and value to be used
String actualName = null;
String actualValue = null;
- Hashtable values = new Hashtable();
+ HashMap values = new HashMap();
for (int i = 0; i < attributes.getLength(); i++) {
String name = attributes.getName(i);
String value = attributes.getValue(i);