Author: oheger
Date: Sat Jan 21 20:22:44 2017
New Revision: 1779754

URL: http://svn.apache.org/viewvc?rev=1779754&view=rev
Log:
[CONFIGURATION-649] Documentation updates.

Added a warning about changing the list delimiter handler to both
Javadocs and the user's guide.

Modified:
    
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java
    
commons/proper/configuration/trunk/src/site/xdoc/userguide/howto_basicfeatures.xml

Modified: 
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java
URL: 
http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java?rev=1779754&r1=1779753&r2=1779754&view=diff
==============================================================================
--- 
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java
 (original)
+++ 
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java
 Sat Jan 21 20:22:44 2017
@@ -149,6 +149,7 @@ public abstract class AbstractConfigurat
     }
 
     /**
+     * <p>
      * Sets the {@code ListDelimiterHandler} to be used by this instance. This
      * object is invoked every time when dealing with string properties that 
may
      * contain a list delimiter and thus have to be split to multiple values.
@@ -156,6 +157,15 @@ public abstract class AbstractConfigurat
      * does not support list splitting. This can be changed for instance by
      * setting a {@link 
org.apache.commons.configuration2.convert.DefaultListDelimiterHandler
      * DefaultListDelimiterHandler} object.
+     * </p>
+     * <p>
+     * <strong>Warning:</strong> Be careful when changing the list delimiter
+     * handler when the configuration has already been loaded/populated. List
+     * handling is typically applied already when properties are added to the
+     * configuration. If later another handler is set which processes lists
+     * differently, results may be unexpected; some operations may even cause
+     * exceptions.
+     * </p>
      *
      * @param listDelimiterHandler the {@code ListDelimiterHandler} to be used
      *        (must not be <b>null</b>)

Modified: 
commons/proper/configuration/trunk/src/site/xdoc/userguide/howto_basicfeatures.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/site/xdoc/userguide/howto_basicfeatures.xml?rev=1779754&r1=1779753&r2=1779754&view=diff
==============================================================================
--- 
commons/proper/configuration/trunk/src/site/xdoc/userguide/howto_basicfeatures.xml
 (original)
+++ 
commons/proper/configuration/trunk/src/site/xdoc/userguide/howto_basicfeatures.xml
 Sat Jan 21 20:22:44 2017
@@ -173,6 +173,14 @@ String firstPieColor = config.getString(
       <code>getString()</code> method is called for a property that has
       multiple values. This call will return the first value of the list.
     </p>
+    <p>
+      One word of warning at the end: Be careful when changing the list
+      delimiter handler on a configuration which already contains values. List
+      handling is typically applied already when properties are added to the
+      configuration. If later another handler is set which processes lists
+      differently, results may be unexpected; some operations may even cause
+      exceptions!
+    </p>
     </subsection>
 
     <subsection name="Variable Interpolation">


Reply via email to