commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r492216 - in /jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration: ./ beanutils/ interpol/ plist/
Date Wed, 03 Jan 2007 16:51:25 GMT
Author: oheger
Date: Wed Jan  3 08:51:24 2007
New Revision: 492216

URL: http://svn.apache.org/viewvc?view=rev&rev=492216
Log:
Addressed checkstyle warnings

Added:
    jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/interpol/package.html
  (with props)
Modified:
    jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/AbstractFileConfiguration.java
    jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/AbstractHierarchicalFileConfiguration.java
    jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/CompositeConfiguration.java
    jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/ConfigurationMap.java
    jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DefaultConfigurationBuilder.java
    jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/HierarchicalConfiguration.java
    jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/INIConfiguration.java
    jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/XMLConfiguration.java
    jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/beanutils/ConfigurationDynaBean.java
    jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/beanutils/ConfigurationDynaClass.java
    jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/PropertyListConfiguration.java
    jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/XMLPropertyListConfiguration.java

Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/AbstractFileConfiguration.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/AbstractFileConfiguration.java?view=diff&rev=492216&r1=492215&r2=492216
==============================================================================
--- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/AbstractFileConfiguration.java
(original)
+++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/AbstractFileConfiguration.java
Wed Jan  3 08:51:24 2007
@@ -636,11 +636,15 @@
             }
             else
             {
-                try {
+                try
+                {
                     path = ConfigurationUtils.getURL(getBasePath(),
                             getFileName()).getPath();
-                } catch (MalformedURLException e) {
+                }
+                catch (MalformedURLException e)
+                {
                     // simply ignore it and return null
+                    ;
                 }
             }
         }

Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/AbstractHierarchicalFileConfiguration.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/AbstractHierarchicalFileConfiguration.java?view=diff&rev=492216&r1=492215&r2=492216
==============================================================================
--- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/AbstractHierarchicalFileConfiguration.java
(original)
+++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/AbstractHierarchicalFileConfiguration.java
Wed Jan  3 08:51:24 2007
@@ -51,16 +51,16 @@
      */
     private FileConfigurationDelegate delegate;
 
-	/**
+    /**
      * Creates a new instance of
      * <code>AbstractHierarchicalFileConfiguration</code>.
      */
-	protected AbstractHierarchicalFileConfiguration()
-	{
-		initialize();
-	}
+    protected AbstractHierarchicalFileConfiguration()
+    {
+        initialize();
+    }
 
-	/**
+    /**
      * Creates a new instance of
      * <code>AbstractHierarchicalFileConfiguration</code> and copies the
      * content of the specified configuration into this object.
@@ -68,13 +68,13 @@
      * @param c the configuration to copy
      * @since 1.4
      */
-	protected AbstractHierarchicalFileConfiguration(HierarchicalConfiguration c)
-	{
-		super(c);
-		initialize();
-	}
+    protected AbstractHierarchicalFileConfiguration(HierarchicalConfiguration c)
+    {
+        super(c);
+        initialize();
+    }
 
-	/**
+    /**
      * Creates and loads the configuration from the specified file.
      *
      * @param fileName The name of the plist file to load.
@@ -125,16 +125,16 @@
         load();
     }
 
-	/**
+    /**
      * Initializes this instance, mainly the internally used delegate object.
      */
-	private void initialize()
-	{
-		delegate = createDelegate();
-		initDelegate(delegate);
-	}
+    private void initialize()
+    {
+        delegate = createDelegate();
+        initDelegate(delegate);
+    }
 
-	protected void addPropertyDirect(String key, Object obj)
+    protected void addPropertyDirect(String key, Object obj)
     {
         super.addPropertyDirect(key, obj);
         delegate.possiblySave();

Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/CompositeConfiguration.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/CompositeConfiguration.java?view=diff&rev=492216&r1=492215&r2=492216
==============================================================================
--- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/CompositeConfiguration.java
(original)
+++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/CompositeConfiguration.java
Wed Jan  3 08:51:24 2007
@@ -321,11 +321,11 @@
         {
             return defaultValue;
         }
-        
+
         ListIterator lit = list.listIterator();
         while (lit.hasNext())
         {
-        	lit.set(interpolate(lit.next()));
+            lit.set(interpolate(lit.next()));
         }
 
         return list;

Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/ConfigurationMap.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/ConfigurationMap.java?view=diff&rev=492216&r1=492215&r2=492216
==============================================================================
--- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/ConfigurationMap.java
(original)
+++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/ConfigurationMap.java
Wed Jan  3 08:51:24 2007
@@ -66,6 +66,9 @@
     }
 
     /**
+     * Returns a set with the entries contained in this configuration-based map.
+     *
+     * @return a set with the contained entries
      * @see java.util.Map#entrySet()
      */
     public Set entrySet()
@@ -74,6 +77,12 @@
     }
 
     /**
+     * Stores the value for the specified key. The value is stored in the
+     * underlying configuration.
+     *
+     * @param key the key (will be converted to a string)
+     * @param value the value
+     * @return the old value of this key or <b>null</b> if it is new
      * @see java.util.Map#put(java.lang.Object, java.lang.Object)
      */
     public Object put(Object key, Object value)
@@ -85,6 +94,11 @@
     }
 
     /**
+     * Returns the value of the specified key. The key is converted to a string
+     * and then passed to the underlying configuration.
+     *
+     * @param key the key
+     * @return the value of this key
      * @see java.util.Map#get(java.lang.Object)
      */
     public Object get(Object key)

Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DefaultConfigurationBuilder.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DefaultConfigurationBuilder.java?view=diff&rev=492216&r1=492215&r2=492216
==============================================================================
--- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DefaultConfigurationBuilder.java
(original)
+++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DefaultConfigurationBuilder.java
Wed Jan  3 08:51:24 2007
@@ -1069,6 +1069,7 @@
                         catch (Exception ex2)
                         {
                             // Ignore exception, return null in this case
+                            ;
                         }
                     }
                     return null;

Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/HierarchicalConfiguration.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/HierarchicalConfiguration.java?view=diff&rev=492216&r1=492215&r2=492216
==============================================================================
--- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/HierarchicalConfiguration.java
(original)
+++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/HierarchicalConfiguration.java
Wed Jan  3 08:51:24 2007
@@ -134,7 +134,7 @@
         setRootNode(new Node());
     }
 
-	/**
+    /**
      * Creates a new instance of <code>HierarchicalConfiguration</code> and
      * copies all data contained in the specified configuration into the new
      * one.
@@ -143,18 +143,18 @@
      * constructor will behave like the standard constructor)
      * @since 1.4
      */
-	public HierarchicalConfiguration(HierarchicalConfiguration c)
-	{
-		this();
-		if (c != null)
-		{
-			CloneVisitor visitor = new CloneVisitor();
-			c.getRootNode().visit(visitor);
-			setRootNode(visitor.getClone());
-		}
-	}
+    public HierarchicalConfiguration(HierarchicalConfiguration c)
+    {
+        this();
+        if (c != null)
+        {
+            CloneVisitor visitor = new CloneVisitor();
+            c.getRootNode().visit(visitor);
+            setRootNode(visitor.getClone());
+        }
+    }
 
-	/**
+    /**
      * Returns the root node of this hierarchical configuration. This method
      * exists for backwards compatibility only. New code should use the
      * <code>{@link #getRootNode()}</code> method instead, which operates on
@@ -932,7 +932,7 @@
         return child;
     }
 
-	/**
+    /**
      * Clears all reference fields in a node structure. A configuration node can
      * store a so-called &quot;reference&quot;. The meaning of this data is
      * determined by a concrete sub class. Typically such references are
@@ -943,18 +943,18 @@
      * are to be cleared
      * @since 1.4
      */
-	protected static void clearReferences(ConfigurationNode node)
-	{
-		node.visit(new ConfigurationNodeVisitorAdapter()
-		{
-			public void visitBeforeChildren(ConfigurationNode node)
-			{
-				node.setReference(null);
-			}
-		});
-	}
+    protected static void clearReferences(ConfigurationNode node)
+    {
+        node.visit(new ConfigurationNodeVisitorAdapter()
+        {
+            public void visitBeforeChildren(ConfigurationNode node)
+            {
+                node.setReference(null);
+            }
+        });
+    }
 
-	/**
+    /**
      * A data class for storing (hierarchical) property information. A property
      * can have a value and an arbitrary number of child properties. From
      * version 1.3 on this class is only a thin wrapper over the

Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/INIConfiguration.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/INIConfiguration.java?view=diff&rev=492216&r1=492215&r2=492216
==============================================================================
--- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/INIConfiguration.java
(original)
+++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/INIConfiguration.java
Wed Jan  3 08:51:24 2007
@@ -339,13 +339,13 @@
         {
             return false;
         }
-        return ((s.startsWith("[")) && (s.endsWith("]")));
+        return s.startsWith("[") && s.endsWith("]");
     }
 
     /**
      * Return a set containing the sections in this ini configuration. Note that
      * changes to this set do not affect the configuration.
-     
+     *
      * @return a set containing the sections.
      */
     public Set getSections()
@@ -357,7 +357,9 @@
             String key = (String) iter.next();
             int index = key.indexOf(".");
             if (index >= 0)
+            {
                 sections.add(key.substring(0, index));
+            }
         }
         return sections;
     }

Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/XMLConfiguration.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/XMLConfiguration.java?view=diff&rev=492216&r1=492215&r2=492216
==============================================================================
--- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/XMLConfiguration.java
(original)
+++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/XMLConfiguration.java
Wed Jan  3 08:51:24 2007
@@ -141,7 +141,7 @@
         super();
     }
 
-	/**
+    /**
      * Creates a new instance of <code>XMLConfiguration</code> and copies the
      * content of the passed in configuration into this object. Note that only
      * the data of the passed in configuration will be copied. If, for instance,
@@ -151,16 +151,16 @@
      * @param c the configuration to copy
      * @since 1.4
      */
-	public XMLConfiguration(HierarchicalConfiguration c)
-	{
-		super(c);
-		clearReferences(getRootNode());
-	}
+    public XMLConfiguration(HierarchicalConfiguration c)
+    {
+        super(c);
+        clearReferences(getRootNode());
+    }
 
-	/**
+    /**
      * Creates a new instance of <code>XMLConfiguration</code>. The
      * configuration is loaded from the specified file
-     * 
+     *
      * @param fileName the name of the file to load
      * @throws ConfigurationException if the file cannot be loaded
      */

Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/beanutils/ConfigurationDynaBean.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/beanutils/ConfigurationDynaBean.java?view=diff&rev=492216&r1=492215&r2=492216
==============================================================================
--- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/beanutils/ConfigurationDynaBean.java
(original)
+++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/beanutils/ConfigurationDynaBean.java
Wed Jan  3 08:51:24 2007
@@ -76,9 +76,6 @@
         }
     }
 
-    /**
-     * @see org.apache.commons.beanutils.DynaBean#set(java.lang.String, java.lang.Object)
-     */
     public void set(String name, Object value)
     {
         if (log.isTraceEnabled())
@@ -178,9 +175,6 @@
         }
     }
 
-    /**
-     * @see org.apache.commons.beanutils.DynaBean#get(java.lang.String)
-     */
     public Object get(String name)
     {
         if (log.isTraceEnabled())
@@ -212,9 +206,6 @@
         return result;
     }
 
-    /**
-     * @see org.apache.commons.beanutils.DynaBean#contains(java.lang.String, java.lang.String)
-     */
     public boolean contains(String name, String key)
     {
         Configuration subset = getConfiguration().subset(name);
@@ -226,9 +217,6 @@
         return subset.containsKey(key);
     }
 
-    /**
-     * @see org.apache.commons.beanutils.DynaBean#get(java.lang.String, int)
-     */
     public Object get(String name, int index)
     {
         try
@@ -247,9 +235,6 @@
         }
     }
 
-    /**
-     * @see org.apache.commons.beanutils.DynaBean#get(java.lang.String, java.lang.String)
-     */
     public Object get(String name, String key)
     {
         Configuration subset = getConfiguration().subset(name);
@@ -261,26 +246,17 @@
         return subset.getProperty(key);
     }
 
-    /**
-     * @see org.apache.commons.beanutils.DynaBean#getDynaClass()
-     */
     public DynaClass getDynaClass()
     {
         return new ConfigurationDynaClass(getConfiguration());
     }
 
-    /**
-     * @see org.apache.commons.beanutils.DynaBean#remove(java.lang.String, java.lang.String)
-     */
     public void remove(String name, String key)
     {
         Configuration subset = new SubsetConfiguration(getConfiguration(), name, PROPERTY_DELIMITER);
         subset.setProperty(key, null);
     }
 
-    /**
-     * @see org.apache.commons.beanutils.DynaBean#set(java.lang.String, int, java.lang.Object)
-     */
     public void set(String name, int index, Object value)
     {
         try
@@ -317,12 +293,8 @@
         }
     }
 
-    /**
-     * @see org.apache.commons.beanutils.DynaBean#set(java.lang.String, java.lang.String,
java.lang.Object)
-     */
     public void set(String name, String key, Object value)
     {
         getConfiguration().setProperty(name + "." + key, value);
     }
-
 }

Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/beanutils/ConfigurationDynaClass.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/beanutils/ConfigurationDynaClass.java?view=diff&rev=492216&r1=492215&r2=492216
==============================================================================
--- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/beanutils/ConfigurationDynaClass.java
(original)
+++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/beanutils/ConfigurationDynaClass.java
Wed Jan  3 08:51:24 2007
@@ -60,9 +60,6 @@
         this.configuration = configuration;
     }
 
-    /**
-     * @see org.apache.commons.beanutils.DynaClass#getDynaProperty(java.lang.String)
-     */
     public DynaProperty getDynaProperty(String name)
     {
         if (log.isTraceEnabled())
@@ -121,9 +118,6 @@
         }
     }
 
-    /**
-     * @see org.apache.commons.beanutils.DynaClass#getDynaProperties()
-     */
     public DynaProperty[] getDynaProperties()
     {
         if (log.isTraceEnabled())
@@ -150,20 +144,13 @@
         return propertyArray;
     }
 
-    /**
-     * @see org.apache.commons.beanutils.DynaClass#getName()
-     */
     public String getName()
     {
         return ConfigurationDynaBean.class.getName();
     }
 
-    /**
-     * @see org.apache.commons.beanutils.DynaClass#newInstance()
-     */
     public DynaBean newInstance() throws IllegalAccessException, InstantiationException
     {
         return new ConfigurationDynaBean(configuration);
     }
-
 }

Added: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/interpol/package.html
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/interpol/package.html?view=auto&rev=492216
==============================================================================
--- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/interpol/package.html
(added)
+++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/interpol/package.html
Wed Jan  3 08:51:24 2007
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<html>
+<head>
+</head>
+<body>
+
+<p>
+A package with helper classes used for interpolation (variable substitution).
+</p>
+<p>
+<font size="-2">$Id$</font>
+</p>
+
+</body>
+</html>

Propchange: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/interpol/package.html
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/interpol/package.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/PropertyListConfiguration.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/PropertyListConfiguration.java?view=diff&rev=492216&r1=492215&r2=492216
==============================================================================
--- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/PropertyListConfiguration.java
(original)
+++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/PropertyListConfiguration.java
Wed Jan  3 08:51:24 2007
@@ -84,21 +84,21 @@
     {
     }
 
-	/**
+    /**
      * Creates a new instance of <code>PropertyListConfiguration</code> and
      * copies the content of the specified configuration into this object.
      *
      * @param c the configuration to copy
      * @since 1.4
      */
-	public PropertyListConfiguration(HierarchicalConfiguration c)
-	{
-		super(c);
-	}
+    public PropertyListConfiguration(HierarchicalConfiguration c)
+    {
+        super(c);
+    }
 
-	/**
+    /**
      * Creates and loads the property list from the specified file.
-     * 
+     *
      * @param fileName The name of the plist file to load.
      * @throws ConfigurationException Error while loading the plist file
      */

Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/XMLPropertyListConfiguration.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/XMLPropertyListConfiguration.java?view=diff&rev=492216&r1=492215&r2=492216
==============================================================================
--- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/XMLPropertyListConfiguration.java
(original)
+++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/XMLPropertyListConfiguration.java
Wed Jan  3 08:51:24 2007
@@ -133,21 +133,21 @@
     {
     }
 
-	/**
+    /**
      * Creates a new instance of <code>XMLPropertyListConfiguration</code> and
      * copies the content of the specified configuration into this object.
      *
      * @param c the configuration to copy
      * @since 1.4
      */
-	public XMLPropertyListConfiguration(HierarchicalConfiguration c)
-	{
-		super(c);
-	}
+    public XMLPropertyListConfiguration(HierarchicalConfiguration c)
+    {
+        super(c);
+    }
 
-	/**
+    /**
      * Creates and loads the property list from the specified file.
-     * 
+     *
      * @param fileName The name of the plist file to load.
      * @throws org.apache.commons.configuration.ConfigurationException Error
      * while loading the plist file



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


Mime
View raw message