dgraham     2004/01/18 12:02:37

  Modified:    validator/src/share/org/apache/commons/validator
                        FormSet.java
  Log:
  Removed @deprecated from addConstant(String,String) because that's
  the method replacing other forms of addConstant().  Removed usage
  of FastHashMap because synchronization isn't required.  One thread 
  populates the maps before validation begins and then other threads only
  read the maps during validation.
  
  Revision  Changes    Path
  1.14      +9 -16     
jakarta-commons/validator/src/share/org/apache/commons/validator/FormSet.java
  
  Index: FormSet.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/FormSet.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- FormSet.java      11 Jan 2004 23:30:20 -0000      1.13
  +++ FormSet.java      18 Jan 2004 20:02:37 -0000      1.14
  @@ -59,15 +59,13 @@
    *
    */
   
  -
   package org.apache.commons.validator;
   
   import java.io.Serializable;
   import java.util.Collections;
  +import java.util.HashMap;
   import java.util.Iterator;
   import java.util.Map;
  -import org.apache.commons.collections.FastHashMap;
  -
   
   /**
    * Holds a set of <code>Form</code>s stored associated with a
  @@ -98,16 +96,16 @@
       private String variant = null;
   
       /**
  -     * A <code>FastHashMap</code> of <code>Form</code>s
  +     * A <code>Map</code> of <code>Form</code>s
        * using the name field of the <code>Form</code> as the key.
        */
  -    private FastHashMap forms = new FastHashMap();
  +    private Map forms = new HashMap();
   
       /**
  -     * A <code>FastHashMap</code> of <code>Constant</code>s
  +     * A <code>Map</code> of <code>Constant</code>s
        * using the name field of the <code>Constant</code> as the key.
        */
  -    private FastHashMap constants = new FastHashMap();
  +    private Map constants = new HashMap();
   
       /**
        * Whether or not the this <code>FormSet</code> was processed
  @@ -185,7 +183,6 @@
   
       /**
        * Add a <code>Constant</code> to the locale level.
  -     * @deprecated Use addConstant(String, String) instead.
        */
       public void addConstant(String name, String value) {
           this.constants.put(name, value);
  @@ -222,8 +219,7 @@
       }
   
       /**
  -     * Processes all of the <code>Form</code>s, set <code>FastHashMap</code>s
  -     * to 'fast' mode.
  +     * Processes all of the <code>Form</code>s.
        * @deprecated This method is called by the framework.  It will be made 
protected
        * in a future release.  TODO
        */
  @@ -232,9 +228,6 @@
               Form f = (Form) i.next();
               f.process(globalConstants, constants);
           }
  -
  -        forms.setFast(true);
  -        constants.setFast(true);
   
           processed = true;
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to