commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1479369 - /commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/
Date Sun, 05 May 2013 20:14:13 GMT
Author: oheger
Date: Sun May  5 20:14:12 2013
New Revision: 1479369

URL: http://svn.apache.org/r1479369
Log:
Made clearProperty() method final.

Subclasses now can only override clearPropertyDirect().

Modified:
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/AbstractConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DataConfiguration.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/EnvironmentConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/PatternSubtreeConfigurationWrapper.java

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=1479369&r1=1479368&r2=1479369&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
Sun May  5 20:14:12 2013
@@ -730,7 +730,7 @@ public abstract class AbstractConfigurat
      *
      * @param key the key to be removed
      */
-    public void clearProperty(String key)
+    public final void clearProperty(String key)
     {
         getSynchronizer().beginWrite();
         try

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DataConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DataConfiguration.java?rev=1479369&r1=1479368&r2=1479369&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DataConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DataConfiguration.java
Sun May  5 20:14:12 2013
@@ -158,22 +158,9 @@ public class DataConfiguration extends A
     }
 
     @Override
-    public void clearProperty(String key)
-    {
-        configuration.clearProperty(key);
-    }
-
-    @Override
     protected void clearPropertyDirect(String key)
     {
-        if (configuration instanceof AbstractConfiguration)
-        {
-            ((AbstractConfiguration) configuration).clearPropertyDirect(key);
-        }
-        else
-        {
-            configuration.clearProperty(key);
-        }
+        configuration.clearProperty(key);
     }
 
     @Override

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=1479369&r1=1479368&r2=1479369&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 May  5 20:14:12 2013
@@ -345,7 +345,7 @@ public class DynamicCombinedConfiguratio
     }
 
     @Override
-    public void clearProperty(String key)
+    protected void clearPropertyDirect(String key)
     {
         this.getCurrentConfig().clearProperty(key);
     }

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/EnvironmentConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/EnvironmentConfiguration.java?rev=1479369&r1=1479368&r2=1479369&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/EnvironmentConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/EnvironmentConfiguration.java
Sun May  5 20:14:12 2013
@@ -73,7 +73,7 @@ public class EnvironmentConfiguration ex
      * @param key the key of the property to be removed
      */
     @Override
-    public void clearProperty(String key)
+    protected void clearPropertyDirect(String key)
     {
         throw new UnsupportedOperationException("EnvironmentConfiguration is read-only!");
     }

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/PatternSubtreeConfigurationWrapper.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/PatternSubtreeConfigurationWrapper.java?rev=1479369&r1=1479368&r2=1479369&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/PatternSubtreeConfigurationWrapper.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/PatternSubtreeConfigurationWrapper.java
Sun May  5 20:14:12 2013
@@ -95,7 +95,7 @@ public class PatternSubtreeConfiguration
     }
 
     @Override
-    public void clearProperty(String key)
+    protected void clearPropertyDirect(String key)
     {
         config.clearProperty(makePath(key));
     }



Mime
View raw message