You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by oh...@apache.org on 2013/07/13 21:45:55 UTC

svn commit: r1502872 - in /commons/proper/configuration/trunk/src: main/java/org/apache/commons/configuration/AbstractConfiguration.java test/resources/testMultiTenentConfigurationBuilder4.xml test/resources/testMultiTenentConfigurationBuilder5.xml

Author: oheger
Date: Sat Jul 13 19:45:55 2013
New Revision: 1502872

URL: http://svn.apache.org/r1502872
Log:
Removed old properties for list delimiter parsing from AbstractConfiguration.

Affected are the properties listDelimiter and delimiterParsingDisabled. Also
the static defaultListDelimiter property was removed. The handling of list
delimiter characters is now solely in the responsibility of the list delimter
handler object associated with the configuration.

Modified:
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/AbstractConfiguration.java
    commons/proper/configuration/trunk/src/test/resources/testMultiTenentConfigurationBuilder4.xml
    commons/proper/configuration/trunk/src/test/resources/testMultiTenentConfigurationBuilder5.xml

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/AbstractConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/AbstractConfiguration.java?rev=1502872&r1=1502871&r2=1502872&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/AbstractConfiguration.java (original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/AbstractConfiguration.java Sat Jul 13 19:45:55 2013
@@ -134,21 +134,9 @@ public abstract class AbstractConfigurat
     /** end token */
     protected static final String END_TOKEN = "}";
 
-    /** The default value for listDelimiter */
-    private static char defaultListDelimiter = ',';
-
     /** The list delimiter handler. */
     private ListDelimiterHandler listDelimiterHandler;
 
-    /** Delimiter used to convert single values to lists */
-    private char listDelimiter = defaultListDelimiter;
-
-    /**
-     * When set to true the given configuration delimiter will not be used
-     * while parsing for this configuration.
-     */
-    private boolean delimiterParsingDisabled;
-
     /**
      * Whether the configuration should throw NoSuchElementExceptions or simply
      * return null when a property does not exist. Defaults to return null.
@@ -176,54 +164,6 @@ public abstract class AbstractConfigurat
     }
 
     /**
-     * For configurations extending AbstractConfiguration, allow them to change
-     * the listDelimiter from the default comma (","). This value will be used
-     * only when creating new configurations. Those already created will not be
-     * affected by this change
-     *
-     * @param delimiter The new listDelimiter
-     */
-    public static void setDefaultListDelimiter(char delimiter)
-    {
-        AbstractConfiguration.defaultListDelimiter = delimiter;
-    }
-
-    /**
-     * Sets the default list delimiter.
-     *
-     * @param delimiter the delimiter character
-     * @deprecated Use AbstractConfiguration.setDefaultListDelimiter(char)
-     * instead
-     */
-    @Deprecated
-    public static void setDelimiter(char delimiter)
-    {
-        setDefaultListDelimiter(delimiter);
-    }
-
-    /**
-     * Retrieve the current delimiter. By default this is a comma (",").
-     *
-     * @return The delimiter in use
-     */
-    public static char getDefaultListDelimiter()
-    {
-        return AbstractConfiguration.defaultListDelimiter;
-    }
-
-    /**
-     * Returns the default list delimiter.
-     *
-     * @return the default list delimiter
-     * @deprecated Use AbstractConfiguration.getDefaultListDelimiter() instead
-     */
-    @Deprecated
-    public static char getDelimiter()
-    {
-        return getDefaultListDelimiter();
-    }
-
-    /**
      * Returns the {@code ListDelimiterHandler} used by this instance.
      *
      * @return the {@code ListDelimiterHandler}
@@ -260,57 +200,6 @@ public abstract class AbstractConfigurat
     }
 
     /**
-     * Change the list delimiter for this configuration.
-     *
-     * Note: this change will only be effective for new parsings. If you
-     * want it to take effect for all loaded properties use the no arg constructor
-     * and call this method before setting the source.
-     *
-     * @param listDelimiter The new listDelimiter
-     */
-    public void setListDelimiter(char listDelimiter)
-    {
-        this.listDelimiter = listDelimiter;
-    }
-
-    /**
-     * Retrieve the delimiter for this configuration. The default
-     * is the value of defaultListDelimiter.
-     *
-     * @return The listDelimiter in use
-     */
-    public char getListDelimiter()
-    {
-        return listDelimiter;
-    }
-
-    /**
-     * Determine if this configuration is using delimiters when parsing
-     * property values to convert them to lists of values. Defaults to false
-     * @return true if delimiters are not being used
-     */
-    public boolean isDelimiterParsingDisabled()
-    {
-        return delimiterParsingDisabled;
-    }
-
-    /**
-     * Set whether this configuration should use delimiters when parsing
-     * property values to convert them to lists of values. By default delimiter
-     * parsing is enabled
-     *
-     * Note: this change will only be effective for new parsings. If you
-     * want it to take effect for all loaded properties use the no arg constructor
-     * and call this method before setting source.
-     * @param delimiterParsingDisabled a flag whether delimiter parsing should
-     * be disabled
-     */
-    public void setDelimiterParsingDisabled(boolean delimiterParsingDisabled)
-    {
-        this.delimiterParsingDisabled = delimiterParsingDisabled;
-    }
-
-    /**
      * Allows to set the {@code throwExceptionOnMissing} flag. This
      * flag controls the behavior of property getter methods that return
      * objects if the requested property is missing. If the flag is set to

Modified: commons/proper/configuration/trunk/src/test/resources/testMultiTenentConfigurationBuilder4.xml
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/resources/testMultiTenentConfigurationBuilder4.xml?rev=1502872&r1=1502871&r2=1502872&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/resources/testMultiTenentConfigurationBuilder4.xml (original)
+++ commons/proper/configuration/trunk/src/test/resources/testMultiTenentConfigurationBuilder4.xml Sat Jul 13 19:45:55 2013
@@ -20,7 +20,7 @@
 -->
 <configuration>
   <header>
-    <result delimiterParsingDisabled="true" loggerName="TestLogger"
+    <result loggerName="TestLogger"
             config-class="org.apache.commons.configuration.DynamicCombinedConfiguration"
             keyPattern="$${test:Id}">
       <nodeCombiner config-class="org.apache.commons.configuration.tree.MergeCombiner"/>

Modified: commons/proper/configuration/trunk/src/test/resources/testMultiTenentConfigurationBuilder5.xml
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/resources/testMultiTenentConfigurationBuilder5.xml?rev=1502872&r1=1502871&r2=1502872&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/resources/testMultiTenentConfigurationBuilder5.xml (original)
+++ commons/proper/configuration/trunk/src/test/resources/testMultiTenentConfigurationBuilder5.xml Sat Jul 13 19:45:55 2013
@@ -22,7 +22,7 @@
 -->
 <configuration>
   <header>
-    <result delimiterParsingDisabled="true" loggerName="TestLogger"
+    <result loggerName="TestLogger"
             config-class="org.apache.commons.configuration.DynamicCombinedConfiguration"
             keyPattern="$${sys:Id}">
       <nodeCombiner config-class="org.apache.commons.configuration.tree.MergeCombiner"/>