commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r589380 - in /commons/proper/configuration/trunk/src/java/org/apache/commons/configuration: ./ plist/
Date Sun, 28 Oct 2007 16:37:38 GMT
Author: oheger
Date: Sun Oct 28 09:37:35 2007
New Revision: 589380

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

Modified:
    commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/AbstractHierarchicalFileConfiguration.java
    commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DataConfiguration.java
    commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DatabaseConfiguration.java
    commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DefaultConfigurationBuilder.java
    commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/HierarchicalConfiguration.java
    commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/INIConfiguration.java
    commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/PropertiesConfigurationLayout.java
    commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/PropertyConverter.java
    commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/XMLConfiguration.java
    commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/PropertyListConfiguration.java

Modified: commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/AbstractHierarchicalFileConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/AbstractHierarchicalFileConfiguration.java?rev=589380&r1=589379&r2=589380&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/AbstractHierarchicalFileConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/AbstractHierarchicalFileConfiguration.java
Sun Oct 28 09:37:35 2007
@@ -330,7 +330,7 @@
      * Directly adds sub nodes to this configuration. This implementation checks
      * whether auto save is necessary after executing the operation.
      *
-     * @param the key where the nodes are to be added
+     * @param key the key where the nodes are to be added
      * @param nodes a collection with the nodes to be added
      * @since 1.5
      */

Modified: commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DataConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DataConfiguration.java?rev=589380&r1=589379&r2=589380&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DataConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DataConfiguration.java
Sun Oct 28 09:37:35 2007
@@ -380,10 +380,15 @@
     public Object getArray(Class cls, String key, Object defaultValue)
     {
         // check the type of the default value
-        if (defaultValue != null && (!defaultValue.getClass().isArray() || !cls.isAssignableFrom(defaultValue.getClass().getComponentType())))
+        if (defaultValue != null
+                && (!defaultValue.getClass().isArray() || !cls
+                        .isAssignableFrom(defaultValue.getClass()
+                                .getComponentType())))
         {
-            throw new IllegalArgumentException("The type of the default value (" + defaultValue.getClass()
+ ")"
-                    + " is not an array of the specified class (" + cls + ")");
+            throw new IllegalArgumentException(
+                    "The type of the default value (" + defaultValue.getClass()
+                            + ")" + " is not an array of the specified class ("
+                            + cls + ")");
         }
 
         if (cls.isPrimitive())

Modified: commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DatabaseConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DatabaseConfiguration.java?rev=589380&r1=589379&r2=589380&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DatabaseConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DatabaseConfiguration.java
Sun Oct 28 09:37:35 2007
@@ -560,7 +560,8 @@
      * @return the <code>Connection</code> object to be used
      * @throws SQLException if an error occurs
      * @since 1.4
-     * @deprecated Use a custom datasource to change the connection used by the class. To
be removed in Commons Configuration 2.0
+     * @deprecated Use a custom data source to change the connection used by the
+     * class. To be removed in Commons Configuration 2.0
      */
     protected Connection getConnection() throws SQLException
     {

Modified: commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DefaultConfigurationBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DefaultConfigurationBuilder.java?rev=589380&r1=589379&r2=589380&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DefaultConfigurationBuilder.java
(original)
+++ commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DefaultConfigurationBuilder.java
Sun Oct 28 09:37:35 2007
@@ -30,7 +30,6 @@
 import org.apache.commons.configuration.beanutils.BeanHelper;
 import org.apache.commons.configuration.beanutils.DefaultBeanFactory;
 import org.apache.commons.configuration.beanutils.XMLBeanDeclaration;
-import org.apache.commons.configuration.event.ConfigurationErrorListener;
 import org.apache.commons.configuration.tree.ConfigurationNode;
 import org.apache.commons.configuration.tree.DefaultExpressionEngine;
 import org.apache.commons.configuration.tree.OverrideCombiner;
@@ -123,10 +122,11 @@
  * <td valign="top"><code>config-optional</code></td>
  * <td>Declares a configuration as optional. This means that errors that occur
  * when creating the configuration are ignored. (However
- * <code>{@link ConfigurationErrorListener}</code>s registered at the builder
- * instance will get notified about this error: they receive an event of type
- * <code>EVENT_ERR_LOAD_OPTIONAL</code>. The key property of this event contains
- * the name of the optional configuration source that caused this problem.)</td>
+ * <code>{@link org.apache.commons.configuration.event.ConfigurationErrorListener}</code>s
+ * registered at the builder instance will get notified about this error: they
+ * receive an event of type <code>EVENT_ERR_LOAD_OPTIONAL</code>. The key
+ * property of this event contains the name of the optional configuration source
+ * that caused this problem.)</td>
  * </tr>
  * </table>
  * </p>

Modified: commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/HierarchicalConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/HierarchicalConfiguration.java?rev=589380&r1=589379&r2=589380&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/HierarchicalConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/HierarchicalConfiguration.java
Sun Oct 28 09:37:35 2007
@@ -37,7 +37,6 @@
 import org.apache.commons.configuration.tree.DefaultExpressionEngine;
 import org.apache.commons.configuration.tree.ExpressionEngine;
 import org.apache.commons.configuration.tree.NodeAddData;
-import org.apache.commons.configuration.tree.xpath.XPathExpressionEngine;
 import org.apache.commons.lang.StringUtils;
 
 /**
@@ -105,8 +104,9 @@
  * expression engine, which is used when a new <code>HierarchicalConfiguration</code>
  * instance is created. With the <code>setExpressionEngine()</code> method a
  * different expression engine can be set. For instance with
- * <code>{@link XPathExpressionEngine}</code> there is an expression engine
- * available that supports configuration keys in XPATH syntax.</p>
+ * <code>{@link org.apache.commons.configuration.tree.xpath.XPathExpressionEngine}</code>
+ * there is an expression engine available that supports configuration keys in
+ * XPATH syntax.</p>
  * <p>In addition to the events common for all configuration classes hierarchical
  * configurations support some more events that correspond to some specific
  * methods and features:

Modified: commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/INIConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/INIConfiguration.java?rev=589380&r1=589379&r2=589380&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/INIConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/INIConfiguration.java
Sun Oct 28 09:37:35 2007
@@ -245,7 +245,8 @@
             {
                 String key = (String) keys.next();
                 Object value = subset.getProperty(key);
-                if (value instanceof Collection) {
+                if (value instanceof Collection)
+                {
                     Iterator values = ((Collection) value).iterator();
                     while (values.hasNext())
                     {
@@ -255,7 +256,9 @@
                         out.print(formatValue(value.toString()));
                         out.println();
                     }
-                } else {
+                }
+                else
+                {
                     out.print(key);
                     out.print(" = ");
                     out.print(formatValue(value.toString()));

Modified: commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/PropertiesConfigurationLayout.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/PropertiesConfigurationLayout.java?rev=589380&r1=589379&r2=589380&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/PropertiesConfigurationLayout.java
(original)
+++ commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/PropertiesConfigurationLayout.java
Sun Oct 28 09:37:35 2007
@@ -443,8 +443,10 @@
     {
         try
         {
-            char delimiter = getConfiguration().isDelimiterParsingDisabled() ? 0 : getConfiguration().getListDelimiter();
-            PropertiesConfiguration.PropertiesWriter writer = new PropertiesConfiguration.PropertiesWriter(out,
delimiter);
+            char delimiter = getConfiguration().isDelimiterParsingDisabled() ? 0
+                    : getConfiguration().getListDelimiter();
+            PropertiesConfiguration.PropertiesWriter writer = new PropertiesConfiguration.PropertiesWriter(
+                    out, delimiter);
             if (headerComment != null)
             {
                 writer.writeln(getCanonicalHeaderComment(true));
@@ -457,7 +459,7 @@
                 if (getConfiguration().containsKey(key))
                 {
 
-                    // Output blanc lines before property
+                    // Output blank lines before property
                     for (int i = 0; i < getBlancLinesBefore(key); i++)
                     {
                         writer.writeln(null);
@@ -470,8 +472,10 @@
                     }
 
                     // Output the property and its value
-                    boolean singleLine = (isForceSingleLine() || isSingleLine(key)) &&
!getConfiguration().isDelimiterParsingDisabled();
-                    writer.writeProperty(key, getConfiguration().getProperty(key), singleLine);
+                    boolean singleLine = (isForceSingleLine() || isSingleLine(key))
+                            && !getConfiguration().isDelimiterParsingDisabled();
+                    writer.writeProperty(key, getConfiguration().getProperty(
+                            key), singleLine);
                 }
             }
             writer.flush();

Modified: commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/PropertyConverter.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/PropertyConverter.java?rev=589380&r1=589379&r2=589380&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/PropertyConverter.java
(original)
+++ commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/PropertyConverter.java
Sun Oct 28 09:37:35 2007
@@ -66,6 +66,9 @@
     /** Constant for the radix of hex numbers.*/
     private static final int HEX_RADIX = 16;
 
+    /** Constant for the Java version 1.5.*/
+    private static final float JAVA_VERSION_1_5 = 1.5f;
+
     /** Constant for the argument classes of the Number constructor that takes a String.
*/
     private static final Class[] CONSTR_ARGS = {String.class};
 
@@ -718,7 +721,7 @@
      */
     static boolean isEnum(Class cls)
     {
-        if (!SystemUtils.isJavaVersionAtLeast(1.5f))
+        if (!SystemUtils.isJavaVersionAtLeast(JAVA_VERSION_1_5))
         {
             return false;
         }

Modified: commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/XMLConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/XMLConfiguration.java?rev=589380&r1=589379&r2=589380&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/XMLConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/XMLConfiguration.java
Sun Oct 28 09:37:35 2007
@@ -901,6 +901,7 @@
      *
      * @param publicId the public identifier of the entity being referenced
      * @param systemId the system identifier of the entity being referenced
+     * @return an input source for the specified entity
      * @throws SAXException if a parsing exception occurs
      * @since 1.5
      */

Modified: commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/PropertyListConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/PropertyListConfiguration.java?rev=589380&r1=589379&r2=589380&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/PropertyListConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/plist/PropertyListConfiguration.java
Sun Oct 28 09:37:35 2007
@@ -44,8 +44,12 @@
  * <p>
  * References:
  * <ul>
- *   <li><a href="http://developer.apple.com/documentation/Cocoa/Conceptual/PropertyLists/Articles/OldStylePListsConcept.html">Apple
Documentation - Old-Style ASCII Property Lists</a></li>
- *   <li><a href="http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSPropertyList.html">GNUStep
Documentation</a></li>
+ *   <li><a
+ * href="http://developer.apple.com/documentation/Cocoa/Conceptual/PropertyLists/Articles/OldStylePListsConcept.html">
+ * Apple Documentation - Old-Style ASCII Property Lists</a></li>
+ *   <li><a
+ * href="http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSPropertyList.html">
+ * GNUStep Documentation</a></li>
  * </ul>
  *
  * <p>Example:</p>



Mime
View raw message