mpoeschl    2002/12/03 06:13:55

  Modified:    configuration/src/java/org/apache/commons/configuration
                        PropertiesConfiguration.java BaseConfiguration.java
                        XmlConfiguration.java
  Log:
  fix some checkstyle errors
  
  Revision  Changes    Path
  1.5       +5 -4      
jakarta-commons-sandbox/configuration/src/java/org/apache/commons/configuration/PropertiesConfiguration.java
  
  Index: PropertiesConfiguration.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/configuration/src/java/org/apache/commons/configuration/PropertiesConfiguration.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PropertiesConfiguration.java      28 Aug 2002 19:43:13 -0000      1.4
  +++ PropertiesConfiguration.java      3 Dec 2002 14:13:55 -0000       1.5
  @@ -55,16 +55,17 @@
    */
   
   import java.io.File;
  -import java.io.*;
  +import java.io.FileInputStream;
  +import java.io.FileWriter;
  +import java.io.IOException;
   import java.io.InputStream;
   import java.io.InputStreamReader;
  -import java.io.IOException;
   import java.io.LineNumberReader;
   import java.io.Reader;
   import java.io.UnsupportedEncodingException;
  +import java.util.Date;
   import java.util.Iterator;
   import org.apache.commons.lang.StringUtils;
  -import java.util.Date;
   
   /**
    * loads the configuration from a properties file. <p>
  
  
  
  1.5       +17 -22    
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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- BaseConfiguration.java    3 Dec 2002 14:03:54 -0000       1.4
  +++ BaseConfiguration.java    3 Dec 2002 14:13:55 -0000       1.5
  @@ -101,7 +101,9 @@
        */
       protected ArrayList keysAsListed = new ArrayList();
   
  +    /** start token */
       protected static final String START_TOKEN = "${";
  +    /** end token */
       protected static final String END_TOKEN = "}";
   
       /**
  @@ -131,7 +133,7 @@
           }
           else if (token instanceof Collection)
           {
  -            for (Iterator it = ((Collection) token).iterator(); it.hasNext(); )
  +            for (Iterator it = ((Collection) token).iterator(); it.hasNext();)
               {
                   addProperty(key, it.next());
               }
  @@ -148,8 +150,8 @@
           if (o instanceof Container)
           {
               // There is already a container for our key in the config
  -            // Simply add the new tokens 
  -            for (Iterator it = tokenAdd.iterator(); it.hasNext(); )
  +            // Simply add the new tokens
  +            for (Iterator it = tokenAdd.iterator(); it.hasNext();)
               {
                   ((Container) o).add(it.next());
               }
  @@ -167,7 +169,7 @@
               }
   
               // Now gobble up the supplied objects
  -            for (Iterator it = tokenAdd.iterator(); it.hasNext(); )
  +            for (Iterator it = tokenAdd.iterator(); it.hasNext();)
               {
                   c.add(it.next());
               }
  @@ -557,7 +559,7 @@
   
           //
           // We must never give a Container Object out. So if the
  -        // Return Value is a Container, we fix it up to be a 
  +        // Return Value is a Container, we fix it up to be a
           // Vector
           //
           if (o instanceof Container)
  @@ -1311,14 +1313,14 @@
               }
               else
               {
  -                v = ((defaultValue == null) ?
  -                     new Vector() : defaultValue);
  +                v = ((defaultValue == null) ? new Vector() : defaultValue);
               }
           }
           else
           {
  -            throw new ClassCastException(
  -                '\'' + key + "' doesn't map to a Vector object: " + value + ", a " 
+ value.getClass().getName());
  +            throw new ClassCastException('\'' + key
  +                    + "' doesn't map to a Vector object: " + value + ", a "
  +                    + value.getClass().getName());
           }
           return v;
       }
  @@ -1330,9 +1332,7 @@
        */
       class PropertiesTokenizer extends StringTokenizer
       {
  -        /**
  -         * The property delimiter used while parsing (a comma).
  -         */
  +        /** The property delimiter used while parsing (a comma). */
           static final String DELIMITER = ",";
   
           /**
  @@ -1378,14 +1378,13 @@
                       break;
                   }
               }
  -
               return buffer.toString().trim();
           }
       } // class PropertiesTokenizer
   
   
       /**
  -     * Private Wrapper class for Vector, so we can distinguish between 
  +     * Private Wrapper class for Vector, so we can distinguish between
        * Vector objects and our container
        */
       class Container
  @@ -1425,7 +1424,6 @@
            * Returns the Element at an index
            *
            * @param index The Index
  -         *
            * @return The element at that index
            */
           public Object get(int index)
  @@ -1434,8 +1432,7 @@
           }
   
           /**
  -         * Returns an Iterator over the container
  -         * objects
  +         * Returns an Iterator over the container objects
            *
            * @return An Iterator
            */
  @@ -1451,15 +1448,13 @@
            * list. You may modify the returned list without
            * modifying the container.
            *
  -         * @return A Vector containing the elements of
  -         *         the Container.
  +         * @return A Vector containing the elements of the Container.
            */
  -
           public Vector asVector()
           {
               Vector v = new Vector(l.size());
   
  -            for (Iterator it = l.iterator(); it.hasNext(); )
  +            for (Iterator it = l.iterator(); it.hasNext();)
               {
                   v.add(it.next());
               }
  
  
  
  1.3       +3 -2      
jakarta-commons-sandbox/configuration/src/java/org/apache/commons/configuration/XmlConfiguration.java
  
  Index: XmlConfiguration.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/configuration/src/java/org/apache/commons/configuration/XmlConfiguration.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XmlConfiguration.java     28 Aug 2002 18:16:02 -0000      1.2
  +++ XmlConfiguration.java     3 Dec 2002 14:13:55 -0000       1.3
  @@ -65,8 +65,9 @@
    *   </entries>
    * </configuration>
    *
  + * @author you?
  + * @version $Id$
    */
  -public class XmlConfiguration
  -    extends BaseConfiguration
  +public class XmlConfiguration extends BaseConfiguration
   {
   }
  
  
  

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

Reply via email to