commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1231721 - in /commons/proper/configuration/trunk/src: main/java/org/apache/commons/configuration/ test/java/org/apache/commons/configuration/
Date Sun, 15 Jan 2012 18:32:08 GMT
Author: oheger
Date: Sun Jan 15 18:32:07 2012
New Revision: 1231721

URL: http://svn.apache.org/viewvc?rev=1231721&view=rev
Log:
Changed return type of clone() method back to Object to restore binary compatibility.

Modified:
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/AbstractFileConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/BaseConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DynamicCombinedConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/PropertiesConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/XMLConfiguration.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestBaseConfiguration.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestFileConfiguration.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestPropertiesConfiguration.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestXMLConfiguration.java

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/AbstractFileConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/AbstractFileConfiguration.java?rev=1231721&r1=1231720&r2=1231721&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/AbstractFileConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/AbstractFileConfiguration.java
Sun Jan 15 18:32:07 2012
@@ -1039,7 +1039,7 @@ implements FileConfiguration, FileSystem
      * @since 1.3
      */
     @Override
-    public AbstractFileConfiguration clone()
+    public Object clone()
     {
         AbstractFileConfiguration copy = (AbstractFileConfiguration) super.clone();
         copy.setBasePath(null);

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/BaseConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/BaseConfiguration.java?rev=1231721&r1=1231720&r2=1231721&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/BaseConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/BaseConfiguration.java
Sun Jan 15 18:32:07 2012
@@ -165,7 +165,7 @@ public class BaseConfiguration extends A
      * @since 1.3
      */
     @Override
-    public BaseConfiguration clone()
+    public Object clone()
     {
         try
         {

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DynamicCombinedConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DynamicCombinedConfiguration.java?rev=1231721&r1=1231720&r2=1231721&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DynamicCombinedConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DynamicCombinedConfiguration.java
Sun Jan 15 18:32:07 2012
@@ -766,9 +766,9 @@ public class DynamicCombinedConfiguratio
      * @return the copied object
      */
     @Override
-    public DynamicCombinedConfiguration clone()
+    public Object clone()
     {
-        return (DynamicCombinedConfiguration) super.clone();
+        return super.clone();
     }
 
     /**
@@ -805,7 +805,7 @@ public class DynamicCombinedConfiguratio
     @Override
     protected Object resolveContainerStore(String key)
     {
-        if (((Boolean) recursive.get()).booleanValue())
+        if (recursive.get().booleanValue())
         {
             return null;
         }

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/PropertiesConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/PropertiesConfiguration.java?rev=1231721&r1=1231720&r2=1231721&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/PropertiesConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/PropertiesConfiguration.java
Sun Jan 15 18:32:07 2012
@@ -518,7 +518,7 @@ public class PropertiesConfiguration ext
      * @return the copy
      */
     @Override
-    public PropertiesConfiguration clone()
+    public Object clone()
     {
         PropertiesConfiguration copy = (PropertiesConfiguration) super.clone();
         if (layout != null)

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/XMLConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/XMLConfiguration.java?rev=1231721&r1=1231720&r2=1231721&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/XMLConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/XMLConfiguration.java
Sun Jan 15 18:32:07 2012
@@ -1059,7 +1059,7 @@ public class XMLConfiguration extends Ab
      * @return the copy
      */
     @Override
-    public XMLConfiguration clone()
+    public Object clone()
     {
         XMLConfiguration copy = (XMLConfiguration) super.clone();
 

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestBaseConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestBaseConfiguration.java?rev=1231721&r1=1231720&r2=1231721&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestBaseConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestBaseConfiguration.java
Sun Jan 15 18:32:07 2012
@@ -678,7 +678,7 @@ public class TestBaseConfiguration
         {
             config.addProperty("key" + i, new Integer(i));
         }
-        BaseConfiguration config2 = config.clone();
+        BaseConfiguration config2 = (BaseConfiguration) config.clone();
 
         for (Iterator<String> it = config.getKeys(); it.hasNext();)
         {
@@ -704,7 +704,7 @@ public class TestBaseConfiguration
         };
         config.addConfigurationListener(l);
         config.addProperty("original", Boolean.TRUE);
-        BaseConfiguration config2 = config.clone();
+        BaseConfiguration config2 = (BaseConfiguration) config.clone();
 
         config2.addProperty("clone", Boolean.TRUE);
         assertFalse("New key appears in original", config.containsKey("clone"));
@@ -725,7 +725,7 @@ public class TestBaseConfiguration
         final String key = "list";
         config.addProperty(key, "value1");
         config.addProperty(key, "value2");
-        BaseConfiguration config2 = config.clone();
+        BaseConfiguration config2 = (BaseConfiguration) config.clone();
         config2.addProperty(key, "value3");
         assertEquals("Wrong number of original properties", 2, config.getList(
                 key).size());

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestFileConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestFileConfiguration.java?rev=1231721&r1=1231720&r2=1231721&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestFileConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestFileConfiguration.java
Sun Jan 15 18:32:07 2012
@@ -533,7 +533,7 @@ public class TestFileConfiguration
     {
         PropertiesConfiguration config = new PropertiesConfiguration(
                 RESOURCE_NAME);
-        PropertiesConfiguration copy = config.clone();
+        PropertiesConfiguration copy = (PropertiesConfiguration) config.clone();
         compare(config, copy);
         assertNull("URL was not reset", copy.getURL());
         assertNull("Base path was not reset", copy.getBasePath());

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=1231721&r1=1231720&r2=1231721&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
Sun Jan 15 18:32:07 2012
@@ -741,7 +741,7 @@ public class TestPropertiesConfiguration
     @Test
     public void testClone() throws ConfigurationException
     {
-        PropertiesConfiguration copy = conf.clone();
+        PropertiesConfiguration copy = (PropertiesConfiguration) conf.clone();
         assertNotSame("Copy has same layout object", conf.getLayout(), copy.getLayout());
         assertEquals("Wrong number of event listeners for original", 1, conf.getConfigurationListeners().size());
         assertEquals("Wrong number of event listeners for clone", 1, copy.getConfigurationListeners().size());
@@ -761,7 +761,7 @@ public class TestPropertiesConfiguration
     public void testCloneNullLayout()
     {
         conf = new PropertiesConfiguration();
-        PropertiesConfiguration copy = conf.clone();
+        PropertiesConfiguration copy = (PropertiesConfiguration) conf.clone();
         assertNotSame("Layout objects are the same", conf.getLayout(), copy.getLayout());
     }
 

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestXMLConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestXMLConfiguration.java?rev=1231721&r1=1231720&r2=1231721&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestXMLConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestXMLConfiguration.java
Sun Jan 15 18:32:07 2012
@@ -813,7 +813,7 @@ public class TestXMLConfiguration
     @Test
     public void testClone()
     {
-        Configuration c = conf.clone();
+        Configuration c = (Configuration) conf.clone();
         assertTrue(c instanceof XMLConfiguration);
         XMLConfiguration copy = (XMLConfiguration) c;
         assertNotNull(conf.getDocument());
@@ -829,12 +829,12 @@ public class TestXMLConfiguration
 
     /**
      * Tests saving a configuration after cloning to ensure that the clone and
-     * the original are completely detachted.
+     * the original are completely detached.
      */
     @Test
     public void testCloneWithSave() throws ConfigurationException
     {
-        XMLConfiguration c = conf.clone();
+        XMLConfiguration c = (XMLConfiguration) conf.clone();
         c.addProperty("test.newProperty", Boolean.TRUE);
         conf.addProperty("test.orgProperty", Boolean.TRUE);
         c.save(testSaveConf);



Mime
View raw message