commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject cvs commit: jakarta-commons-sandbox/configuration/src/java/org/apache/commons/configuration BaseConfiguration.java
Date Wed, 22 Jan 2003 03:00:22 GMT
dlr         2003/01/21 19:00:22

  Modified:    configuration/src/java/org/apache/commons/configuration
                        BaseConfiguration.java
  Log:
  * src/java/org/apache/commons/configuration/BaseConfiguration.java
    Added a new INITIAL_LIST_SIZE constant to replace magic numbers used
    in processString(String) method and no-args Container constructor.
  
  Revision  Changes    Path
  1.9       +5 -3      jakarta-commons-sandbox/configuration/src/java/org/apache/commons/configuration/BaseConfiguration.java
  
  Index: BaseConfiguration.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/configuration/src/java/org/apache/commons/configuration/BaseConfiguration.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -u -r1.8 -r1.9
  --- BaseConfiguration.java	14 Jan 2003 02:53:31 -0000	1.8
  +++ BaseConfiguration.java	22 Jan 2003 03:00:21 -0000	1.9
  @@ -88,6 +88,8 @@
    */
   public class BaseConfiguration implements Configuration
   {
  +    private static final int INITIAL_LIST_SIZE = 2;
  +
       /** stores the configuration key-value pairs */
       private Hashtable store = new Hashtable();
   
  @@ -209,7 +211,7 @@
        */
       protected List processString(String token)
       {
  -        List retList = new ArrayList(2);
  +        List retList = new ArrayList(INITIAL_LIST_SIZE);
   
           if (token.indexOf(PropertiesTokenizer.DELIMITER) > 0)
           {
  @@ -1425,7 +1427,7 @@
            */
           public Container()
           {
  -            l = new Vector(2);
  +            l = new Vector(INITIAL_LIST_SIZE);
           }
   
           /**
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message