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/04/08 21:56:49 UTC

svn commit: r1465750 - in /commons/proper/configuration/trunk/src: main/java/org/apache/commons/configuration/PropertiesConfigurationLayout.java test/java/org/apache/commons/configuration/TestPropertiesConfiguration.java

Author: oheger
Date: Mon Apr  8 19:56:49 2013
New Revision: 1465750

URL: http://svn.apache.org/r1465750
Log:
PropertiesConfiguration.clear() now also resets the footer comment.

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/TestPropertiesConfiguration.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=1465750&r1=1465749&r2=1465750&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 Mon Apr  8 19:56:49 2013
@@ -664,6 +664,7 @@ public class PropertiesConfigurationLayo
     {
         layoutData.clear();
         setHeaderComment(null);
+        setFooterComment(null);
     }
 
     /**

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestPropertiesConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestPropertiesConfiguration.java?rev=1465750&r1=1465749&r2=1465750&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestPropertiesConfiguration.java (original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestPropertiesConfiguration.java Mon Apr  8 19:56:49 2013
@@ -990,6 +990,17 @@ public class TestPropertiesConfiguration
     }
 
     /**
+     * Tests whether a clear() operation clears the footer comment.
+     */
+    @Test
+    public void testClearFooterComment()
+    {
+        conf.clear();
+        assertNull("Still got a footer comment", conf.getFooter());
+        assertNull("Still got a header comment", conf.getHeader());
+    }
+
+    /**
      * Tests the escaping of quotation marks in a properties value. This test is
      * related to CONFIGURATION-516.
      */