commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1502870 - in /commons/proper/configuration/trunk/src: main/java/org/apache/commons/configuration/PropertiesConfigurationLayout.java test/java/org/apache/commons/configuration/TestPropertiesConfigurationLayout.java
Date Sat, 13 Jul 2013 19:44:31 GMT
Author: oheger
Date: Sat Jul 13 19:44:31 2013
New Revision: 1502870

URL: http://svn.apache.org/r1502870
Log:
Removed a check whether delimiter parsing is disabled.

This check was done to determine the value of the forceSingleLine flag. The
code for writing properties now uses the list delimiter handler for escaping
lists. If this is not supported, the property is written on multiple lines.
Also replaced an unnecessary call to setListDelimiter() in a test case.

Modified:
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/PropertiesConfigurationLayout.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestPropertiesConfigurationLayout.java

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/PropertiesConfigurationLayout.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/PropertiesConfigurationLayout.java?rev=1502870&r1=1502869&r2=1502870&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/PropertiesConfigurationLayout.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/PropertiesConfigurationLayout.java
Sat Jul 13 19:44:31 2013
@@ -581,8 +581,7 @@ public class PropertiesConfigurationLayo
                     writeComment(writer, getCanonicalComment(key, true));
 
                     // Output the property and its value
-                    boolean singleLine = (isForceSingleLine() || isSingleLine(key))
-                            && !config.isDelimiterParsingDisabled();
+                    boolean singleLine = isForceSingleLine() || isSingleLine(key);
                     writer.setCurrentSeparator(getSeparator(key));
                     writer.writeProperty(key, config.getPropertyInternal(
                             key), singleLine);

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestPropertiesConfigurationLayout.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestPropertiesConfigurationLayout.java?rev=1502870&r1=1502869&r2=1502870&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestPropertiesConfigurationLayout.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestPropertiesConfigurationLayout.java
Sat Jul 13 19:44:31 2013
@@ -452,7 +452,6 @@ public class TestPropertiesConfiguration
     @Test
     public void testSaveForceSingleLine() throws ConfigurationException
     {
-        config.setListDelimiter(';');
         config.setListDelimiterHandler(new DefaultListDelimiterHandler(';'));
         config.addProperty(TEST_KEY, TEST_VALUE);
         config.addProperty(TEST_KEY, TEST_VALUE + "2");



Mime
View raw message