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 2011/11/27 18:10:27 UTC

svn commit: r1206770 - in /commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration: CombinedConfiguration.java DynamicCombinedConfiguration.java

Author: oheger
Date: Sun Nov 27 17:10:27 2011
New Revision: 1206770

URL: http://svn.apache.org/viewvc?rev=1206770&view=rev
Log:
Java 1.5 compatibility: Javadocs, raw types, for loops, etc.

Modified:
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/CombinedConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DynamicCombinedConfiguration.java

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/CombinedConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/CombinedConfiguration.java?rev=1206770&r1=1206769&r2=1206770&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/CombinedConfiguration.java (original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/CombinedConfiguration.java Sun Nov 27 17:10:27 2011
@@ -44,11 +44,11 @@ import org.apache.commons.configuration.
  * </p>
  * <p>
  * This class maintains a list of configuration objects, which can be added
- * using the divers <code>addConfiguration()</code> methods. After that the
+ * using the divers {@code addConfiguration()} methods. After that the
  * configurations can be accessed either by name (if one was provided when the
  * configuration was added) or by index. For the whole set of managed
  * configurations a logical node structure is constructed. For this purpose a
- * <code>{@link org.apache.commons.configuration.tree.NodeCombiner NodeCombiner}</code>
+ * {@link org.apache.commons.configuration.tree.NodeCombiner NodeCombiner}
  * object can be set. This makes it possible to specify different algorithms for
  * the combination process.
  * </p>
@@ -65,23 +65,23 @@ import org.apache.commons.configuration.
  * changed and can invalidate its internal node structure. The next time a
  * property is accessed the node structure will be re-constructed using the
  * current state of the managed configurations. Note that, depending on the used
- * <code>NodeCombiner</code>, this may be a complex operation.
+ * {@code NodeCombiner}, this may be a complex operation.
  * </p>
  * <p>
- * Because of the way a <code>CombinedConfiguration</code> is working it has
+ * Because of the way a {@code CombinedConfiguration} is working it has
  * more or less view character: it provides a logic view on the configurations
  * it contains. In this constellation not all methods defined for hierarchical
  * configurations - especially methods that update the stored properties - can
  * be implemented in a consistent manner. Using such methods (like
- * <code>addProperty()</code>, or <code>clearProperty()</code> on a
- * <code>CombinedConfiguration</code> is not strictly forbidden, however,
- * depending on the current <code>{@link NodeCombiner}</code> and the involved
+ * {@code addProperty()}, or {@code clearProperty()} on a
+ * {@code CombinedConfiguration} is not strictly forbidden, however,
+ * depending on the current {@link NodeCombiner} and the involved
  * properties, the results may be different than expected. Some examples may
  * illustrate this:
  * </p>
  * <p>
  * <ul>
- * <li>Imagine a <code>CombinedConfiguration</code> <em>cc</em> containing
+ * <li>Imagine a {@code CombinedConfiguration} <em>cc</em> containing
  * two child configurations with the following content:
  * <dl>
  * <dt>user.properties</dt>
@@ -104,29 +104,29 @@ import org.apache.commons.configuration.
  *
  * </dd>
  * </dl>
- * As a <code>NodeCombiner</code> a
- * <code>{@link org.apache.commons.configuration.tree.OverrideCombiner OverrideCombiner}</code>
+ * As a {@code NodeCombiner} a
+ * {@link org.apache.commons.configuration.tree.OverrideCombiner OverrideCombiner}
  * is used. This combiner will ensure that defined user settings take precedence
- * over the default values. If the resulting <code>CombinedConfiguration</code>
- * is queried for the background color, <code>blue</code> will be returned
- * because this value is defined in <code>user.properties</code>. Now
- * consider what happens if the key <code>gui.background</code> is removed
- * from the <code>CombinedConfiguration</code>:
+ * over the default values. If the resulting {@code CombinedConfiguration}
+ * is queried for the background color, {@code blue} will be returned
+ * because this value is defined in {@code user.properties}. Now
+ * consider what happens if the key {@code gui.background} is removed
+ * from the {@code CombinedConfiguration}:
  *
  * <pre>cc.clearProperty("gui.background");</pre>
  *
- * Will a <code>cc.containsKey("gui.background")</code> now return <b>false</b>?
- * No, it won't! The <code>clearProperty()</code> operation is executed on the
+ * Will a {@code cc.containsKey("gui.background")} now return <b>false</b>?
+ * No, it won't! The {@code clearProperty()} operation is executed on the
  * node set of the combined configuration, which was constructed from the nodes
  * of the two child configurations. It causes the value of the
  * <em>background</em> node to be cleared, which is also part of the first
  * child configuration. This modification of one of its child configurations
- * causes the <code>CombinedConfiguration</code> to be re-constructed. This
- * time the <code>OverrideCombiner</code> cannot find a
- * <code>gui.background</code> property in the first child configuration, but
+ * causes the {@code CombinedConfiguration} to be re-constructed. This
+ * time the {@code OverrideCombiner} cannot find a
+ * {@code gui.background} property in the first child configuration, but
  * it finds one in the second, and adds it to the resulting combined
  * configuration. So the property is still present (with a different value now).</li>
- * <li><code>addProperty()</code> can also be problematic: Most node
+ * <li>{@code addProperty()} can also be problematic: Most node
  * combiners use special view nodes for linking parts of the original
  * configurations' data together. If new properties are added to such a special
  * node, they do not belong to any of the managed configurations and thus hang
@@ -138,21 +138,21 @@ import org.apache.commons.configuration.
  * </pre>
  *
  * would cause such a hanging property. If now one of the child configurations
- * is changed and the <code>CombinedConfiguration</code> is re-constructed,
+ * is changed and the {@code CombinedConfiguration} is re-constructed,
  * this property will disappear! (Add operations are not problematic if they
  * result in a child configuration being updated. For instance an
- * <code>addProperty("home.url", "localhost");</code> will alter the second
+ * {@code addProperty("home.url", "localhost");} will alter the second
  * child configuration - because the prefix <em>home</em> is here already
- * present; when the <code>CombinedConfiguration</code> is re-constructed,
+ * present; when the {@code CombinedConfiguration} is re-constructed,
  * this change is taken into account.)</li>
  * </ul>
  * Because of such problems it is recommended to perform updates only on the
  * managed child configurations.
  * </p>
  * <p>
- * Whenever the node structure of a <code>CombinedConfiguration</code> becomes
+ * Whenever the node structure of a {@code CombinedConfiguration} becomes
  * invalid (either because one of the contained configurations was modified or
- * because the <code>invalidate()</code> method was directly called) an event
+ * because the {@code invalidate()} method was directly called) an event
  * is generated. So this can be detected by interested event listeners. This
  * also makes it possible to add a combined configuration into another one.
  * </p>
@@ -199,10 +199,10 @@ public class CombinedConfiguration exten
     private volatile ConfigurationNode combinedRoot;
 
     /** Stores a list with the contained configurations. */
-    private List configurations;
+    private List<ConfigData> configurations;
 
     /** Stores a map with the named configurations. */
-    private Map namedConfigurations;
+    private Map<String, AbstractConfiguration> namedConfigurations;
 
     /** The default behavior is to ignore exceptions that occur during reload */
     private boolean ignoreReloadExceptions = true;
@@ -220,7 +220,7 @@ public class CombinedConfiguration exten
     private boolean forceReloadCheck;
 
     /**
-     * Creates a new instance of <code>CombinedConfiguration</code> and
+     * Creates a new instance of {@code CombinedConfiguration} and
      * initializes the combiner to be used.
      *
      * @param comb the node combiner (can be <b>null</b>, then a union combiner
@@ -245,7 +245,7 @@ public class CombinedConfiguration exten
     }
 
     /**
-     * Creates a new instance of <code>CombinedConfiguration</code> that uses
+     * Creates a new instance of {@code CombinedConfiguration} that uses
      * a union combiner.
      *
      * @see org.apache.commons.configuration.tree.UnionCombiner
@@ -269,7 +269,7 @@ public class CombinedConfiguration exten
     /**
      * Sets the node combiner. This object will be used when the combined node
      * structure is to be constructed. It must not be <b>null</b>, otherwise an
-     * <code>IllegalArgumentException</code> exception is thrown. Changing the
+     * {@code IllegalArgumentException} exception is thrown. Changing the
      * node combiner causes an invalidation of this combined configuration, so
      * that the new combiner immediately takes effect.
      *
@@ -304,7 +304,7 @@ public class CombinedConfiguration exten
      * implementations that only check if a reload is required when they are
      * triggered. Per default this mode is disabled. If the force reload check
      * flag is set to <b>true</b>, accessing properties will be less
-     * performant, but reloads on contained configurations will be detected.
+     * efficient, but reloads on contained configurations will be detected.
      *
      * @param forceReloadCheck the value of the flag
      * @since 1.4
@@ -315,7 +315,7 @@ public class CombinedConfiguration exten
     }
 
     /**
-     * Returns the <code>ExpressionEngine</code> for converting flat child
+     * Returns the {@code ExpressionEngine} for converting flat child
      * configurations to hierarchical ones.
      *
      * @return the conversion expression engine
@@ -327,7 +327,7 @@ public class CombinedConfiguration exten
     }
 
     /**
-     * Sets the <code>ExpressionEngine</code> for converting flat child
+     * Sets the {@code ExpressionEngine} for converting flat child
      * configurations to hierarchical ones. When constructing the root node for
      * this combined configuration the properties of all child configurations
      * must be combined to a single hierarchical node structure. In this
@@ -370,12 +370,12 @@ public class CombinedConfiguration exten
     /**
      * Adds a new configuration to this combined configuration. It is possible
      * (but not mandatory) to give the new configuration a name. This name must
-     * be unique, otherwise a <code>ConfigurationRuntimeException</code> will
-     * be thrown. With the optional <code>at</code> argument you can specify
+     * be unique, otherwise a {@code ConfigurationRuntimeException} will
+     * be thrown. With the optional {@code at} argument you can specify
      * where in the resulting node structure the content of the added
      * configuration should appear. This is a string that uses dots as property
      * delimiters (independent on the current expression engine). For instance
-     * if you pass in the string <code>&quot;database.tables&quot;</code>,
+     * if you pass in the string {@code "database.tables"},
      * all properties of the added configuration will occur in this branch.
      *
      * @param config the configuration to add (must not be <b>null</b>)
@@ -481,13 +481,12 @@ public class CombinedConfiguration exten
      * @return A List of all the configurations.
      * @since 1.7
      */
-    public List getConfigurations()
+    public List<AbstractConfiguration> getConfigurations()
     {
-        List list = new ArrayList();
-        Iterator iter = configurations.iterator();
-        while (iter.hasNext())
+        List<AbstractConfiguration> list = new ArrayList<AbstractConfiguration>(configurations.size());
+        for(ConfigData cd : configurations)
         {
-            list.add(((ConfigData) iter.next()).getConfiguration());
+            list.add(cd.getConfiguration());
         }
         return list;
     }
@@ -499,13 +498,12 @@ public class CombinedConfiguration exten
      * @return A List of all the configuration names.
      * @since 1.7
      */
-    public List getConfigurationNameList()
+    public List<String> getConfigurationNameList()
     {
-        List list = new ArrayList();
-        Iterator iter = configurations.iterator();
-        while (iter.hasNext())
+        List<String> list = new ArrayList<String>(configurations.size());
+        for(ConfigData cd : configurations)
         {
-            list.add(((ConfigData) iter.next()).getName());
+            list.add(cd.getName());
         }
         return list;
     }
@@ -573,7 +571,7 @@ public class CombinedConfiguration exten
      * @return a set with the names of the contained configurations (never
      * <b>null</b>)
      */
-    public Set getConfigurationNames()
+    public Set<String> getConfigurationNames()
     {
         return namedConfigurations.keySet();
     }
@@ -582,7 +580,7 @@ public class CombinedConfiguration exten
      * Invalidates this combined configuration. This means that the next time a
      * property is accessed the combined node structure must be re-constructed.
      * Invalidation of a combined configuration also means that an event of type
-     * <code>EVENT_COMBINED_INVALIDATE</code> is fired. Note that while other
+     * {@code EVENT_COMBINED_INVALIDATE} is fired. Note that while other
      * events most times appear twice (once before and once after an update),
      * this event is only fired once (after update).
      */
@@ -618,6 +616,7 @@ public class CombinedConfiguration exten
      *
      * @return the combined root node
      */
+    @Override
     public ConfigurationNode getRootNode()
     {
         synchronized (getReloadLock())
@@ -634,11 +633,12 @@ public class CombinedConfiguration exten
     /**
      * Clears this configuration. All contained configurations will be removed.
      */
+    @Override
     public void clear()
     {
         fireEvent(EVENT_CLEAR, null, null, true);
-        configurations = new ArrayList();
-        namedConfigurations = new HashMap();
+        configurations = new ArrayList<ConfigData>();
+        namedConfigurations = new HashMap<String, AbstractConfiguration>();
         fireEvent(EVENT_CLEAR, null, null, false);
         invalidate();
     }
@@ -652,13 +652,13 @@ public class CombinedConfiguration exten
      *
      * @return the copied object
      */
-    public Object clone()
+    @Override
+    public CombinedConfiguration clone()
     {
         CombinedConfiguration copy = (CombinedConfiguration) super.clone();
         copy.clear();
-        for (Iterator it = configurations.iterator(); it.hasNext();)
+        for (ConfigData cd : configurations)
         {
-            ConfigData cd = (ConfigData) it.next();
             copy.addConfiguration((AbstractConfiguration) ConfigurationUtils
                     .cloneConfiguration(cd.getConfiguration()), cd.getName(),
                     cd.getAt());
@@ -675,7 +675,7 @@ public class CombinedConfiguration exten
      * <ul>
      * <li>If no node object is found for this key, <b>null</b> is returned.</li>
      * <li>If the key maps to multiple nodes belonging to different
-     * configuration sources, a <code>IllegalArgumentException</code> is
+     * configuration sources, a {@code IllegalArgumentException} is
      * thrown (in this case no unique source can be determined).</li>
      * <li>If exactly one node is found for the key, the (child) configuration
      * object, to which the node belongs is determined and returned.</li>
@@ -698,19 +698,17 @@ public class CombinedConfiguration exten
             throw new IllegalArgumentException("Key must not be null!");
         }
 
-        List nodes = fetchNodeList(key);
+        List<ConfigurationNode> nodes = fetchNodeList(key);
         if (nodes.isEmpty())
         {
             return null;
         }
 
-        Iterator it = nodes.iterator();
-        Configuration source = findSourceConfiguration((ConfigurationNode) it
-                .next());
+        Iterator<ConfigurationNode> it = nodes.iterator();
+        Configuration source = findSourceConfiguration(it.next());
         while (it.hasNext())
         {
-            Configuration src = findSourceConfiguration((ConfigurationNode) it
-                    .next());
+            Configuration src = findSourceConfiguration(it.next());
             if (src != source)
             {
                 throw new IllegalArgumentException("The key " + key
@@ -725,12 +723,13 @@ public class CombinedConfiguration exten
      * Evaluates the passed in property key and returns a list with the matching
      * configuration nodes. This implementation also evaluates the
      * <em>force reload check</em> flag. If it is set,
-     * <code>performReloadCheck()</code> is invoked.
+     * {@code performReloadCheck()} is invoked.
      *
      * @param key the property key
      * @return a list with the matching configuration nodes
      */
-    protected List fetchNodeList(String key)
+    @Override
+    protected List<ConfigurationNode> fetchNodeList(String key)
     {
         if (isForceReloadCheck())
         {
@@ -743,7 +742,7 @@ public class CombinedConfiguration exten
     /**
      * Triggers the contained configurations to perform a reload check if
      * necessary. This method is called when a property of this combined
-     * configuration is accessed and the <code>forceReloadCheck</code> property
+     * configuration is accessed and the {@code forceReloadCheck} property
      * is set to <b>true</b>.
      *
      * @see #setForceReloadCheck(boolean)
@@ -751,14 +750,13 @@ public class CombinedConfiguration exten
      */
     protected void performReloadCheck()
     {
-        for (Iterator it = configurations.iterator(); it.hasNext();)
+        for (ConfigData cd : configurations)
         {
             try
             {
                 // simply retrieve a property; this is enough for
                 // triggering a reload
-                ((ConfigData) it.next()).getConfiguration().getProperty(
-                        PROP_RELOAD_CHECK);
+                cd.getConfiguration().getProperty(PROP_RELOAD_CHECK);
             }
             catch (Exception ex)
             {
@@ -788,13 +786,12 @@ public class CombinedConfiguration exten
 
         else
         {
-            Iterator it = configurations.iterator();
-            ConfigurationNode node = ((ConfigData) it.next())
-                    .getTransformedRoot();
+            Iterator<ConfigData> it = configurations.iterator();
+            ConfigurationNode node = it.next().getTransformedRoot();
             while (it.hasNext())
             {
                 node = getNodeCombiner().combine(node,
-                        ((ConfigData) it.next()).getTransformedRoot());
+                        it.next().getTransformedRoot());
             }
             if (getLogger().isDebugEnabled())
             {
@@ -828,9 +825,8 @@ public class CombinedConfiguration exten
             }
 
             // Check with the root nodes of the child configurations
-            for (Iterator it = configurations.iterator(); it.hasNext();)
+            for (ConfigData cd : configurations)
             {
-                ConfigData cd = (ConfigData) it.next();
                 if (root == cd.getRootNode())
                 {
                     return cd.getConfiguration();
@@ -854,7 +850,7 @@ public class CombinedConfiguration exten
         private String name;
 
         /** Stores the at information as path of nodes. */
-        private Collection atPath;
+        private Collection<String> atPath;
 
         /** Stores the at string.*/
         private String at;
@@ -863,7 +859,7 @@ public class CombinedConfiguration exten
         private ConfigurationNode rootNode;
 
         /**
-         * Creates a new instance of <code>ConfigData</code> and initializes
+         * Creates a new instance of {@code ConfigData} and initializes
          * it.
          *
          * @param config the configuration
@@ -934,10 +930,10 @@ public class CombinedConfiguration exten
             if (atPath != null)
             {
                 // Build the complete path
-                for (Iterator it = atPath.iterator(); it.hasNext();)
+                for (String p : atPath)
                 {
                     ViewNode node = new ViewNode();
-                    node.setName((String) it.next());
+                    node.setName(p);
                     atParent.addChild(node);
                     atParent = node;
                 }
@@ -960,14 +956,14 @@ public class CombinedConfiguration exten
          * @param at the at string
          * @return a collection with the names of the single components
          */
-        private Collection parseAt(String at)
+        private Collection<String> parseAt(String at)
         {
             if (at == null)
             {
                 return null;
             }
 
-            Collection result = new ArrayList();
+            Collection<String> result = new ArrayList<String>();
             DefaultConfigurationKey.KeyIterator it = new DefaultConfigurationKey(
                     AT_ENGINE, at).iterator();
             while (it.hasNext())

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=1206770&r1=1206769&r2=1206770&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 Nov 27 17:10:27 2011
@@ -54,6 +54,7 @@ public class DynamicCombinedConfiguratio
      */
     private static ThreadLocal recursive = new ThreadLocal()
     {
+        @Override
         protected synchronized Object initialValue()
         {
             return Boolean.FALSE;
@@ -134,6 +135,7 @@ public class DynamicCombinedConfiguratio
      *
      * @return the node combiner
      */
+    @Override
     public NodeCombiner getNodeCombiner()
     {
         return nodeCombiner;
@@ -148,6 +150,7 @@ public class DynamicCombinedConfiguratio
      *
      * @param nodeCombiner the node combiner
      */
+    @Override
     public void setNodeCombiner(NodeCombiner nodeCombiner)
     {
         if (nodeCombiner == null)
@@ -174,6 +177,7 @@ public class DynamicCombinedConfiguratio
      * @param at the position of this configuration in the combined tree (can be
      * <b>null</b>)
      */
+    @Override
     public void addConfiguration(AbstractConfiguration config, String name,
             String at)
     {
@@ -190,6 +194,7 @@ public class DynamicCombinedConfiguratio
      *
      * @return the number of contained configurations
      */
+    @Override
     public int getNumberOfConfigurations()
     {
         return configurations.size();
@@ -203,6 +208,7 @@ public class DynamicCombinedConfiguratio
      * @param index the index
      * @return the configuration at this index
      */
+    @Override
     public Configuration getConfiguration(int index)
     {
         ConfigData cd = (ConfigData) configurations.get(index);
@@ -216,6 +222,7 @@ public class DynamicCombinedConfiguratio
      * @param name the name of the configuration
      * @return the configuration with this name
      */
+    @Override
     public Configuration getConfiguration(String name)
     {
         return (Configuration) namedConfigurations.get(name);
@@ -229,6 +236,7 @@ public class DynamicCombinedConfiguratio
      * @return a set with the names of the contained configurations (never
      * <b>null</b>)
      */
+    @Override
     public Set getConfigurationNames()
     {
         return namedConfigurations.keySet();
@@ -241,6 +249,7 @@ public class DynamicCombinedConfiguratio
      * @return the removed configuration (<b>null</b> if this configuration
      * was not found)
      */
+    @Override
     public Configuration removeConfiguration(String name)
     {
         Configuration conf = getConfiguration(name);
@@ -257,6 +266,7 @@ public class DynamicCombinedConfiguratio
      * @param config the configuration to be removed
      * @return a flag whether this configuration was found and could be removed
      */
+    @Override
     public boolean removeConfiguration(Configuration config)
     {
         for (int index = 0; index < getNumberOfConfigurations(); index++)
@@ -277,6 +287,7 @@ public class DynamicCombinedConfiguratio
      * @param index the index
      * @return the removed configuration
      */
+    @Override
     public Configuration removeConfigurationAt(int index)
     {
         ConfigData cd = (ConfigData) configurations.remove(index);
@@ -293,11 +304,13 @@ public class DynamicCombinedConfiguratio
      *
      * @return the combined root node
      */
+    @Override
     public ConfigurationNode getRootNode()
     {
         return getCurrentConfig().getRootNode();
     }
 
+    @Override
     public void setRootNode(ConfigurationNode rootNode)
     {
         if (configs != null)
@@ -310,11 +323,13 @@ public class DynamicCombinedConfiguratio
         }
     }
 
+    @Override
     public void addProperty(String key, Object value)
     {
         this.getCurrentConfig().addProperty(key, value);
     }
 
+    @Override
     public void clear()
     {
         if (configs != null)
@@ -323,191 +338,229 @@ public class DynamicCombinedConfiguratio
         }
     }
 
+    @Override
     public void clearProperty(String key)
     {
         this.getCurrentConfig().clearProperty(key);
     }
 
+    @Override
     public boolean containsKey(String key)
     {
         return this.getCurrentConfig().containsKey(key);
     }
 
+    @Override
     public BigDecimal getBigDecimal(String key, BigDecimal defaultValue)
     {
         return this.getCurrentConfig().getBigDecimal(key, defaultValue);
     }
 
+    @Override
     public BigDecimal getBigDecimal(String key)
     {
         return this.getCurrentConfig().getBigDecimal(key);
     }
 
+    @Override
     public BigInteger getBigInteger(String key, BigInteger defaultValue)
     {
         return this.getCurrentConfig().getBigInteger(key, defaultValue);
     }
 
+    @Override
     public BigInteger getBigInteger(String key)
     {
         return this.getCurrentConfig().getBigInteger(key);
     }
 
+    @Override
     public boolean getBoolean(String key, boolean defaultValue)
     {
         return this.getCurrentConfig().getBoolean(key, defaultValue);
     }
 
+    @Override
     public Boolean getBoolean(String key, Boolean defaultValue)
     {
         return this.getCurrentConfig().getBoolean(key, defaultValue);
     }
 
+    @Override
     public boolean getBoolean(String key)
     {
         return this.getCurrentConfig().getBoolean(key);
     }
 
+    @Override
     public byte getByte(String key, byte defaultValue)
     {
         return this.getCurrentConfig().getByte(key, defaultValue);
     }
 
+    @Override
     public Byte getByte(String key, Byte defaultValue)
     {
         return this.getCurrentConfig().getByte(key, defaultValue);
     }
 
+    @Override
     public byte getByte(String key)
     {
         return this.getCurrentConfig().getByte(key);
     }
 
+    @Override
     public double getDouble(String key, double defaultValue)
     {
         return this.getCurrentConfig().getDouble(key, defaultValue);
     }
 
+    @Override
     public Double getDouble(String key, Double defaultValue)
     {
         return this.getCurrentConfig().getDouble(key, defaultValue);
     }
 
+    @Override
     public double getDouble(String key)
     {
         return this.getCurrentConfig().getDouble(key);
     }
 
+    @Override
     public float getFloat(String key, float defaultValue)
     {
         return this.getCurrentConfig().getFloat(key, defaultValue);
     }
 
+    @Override
     public Float getFloat(String key, Float defaultValue)
     {
         return this.getCurrentConfig().getFloat(key, defaultValue);
     }
 
+    @Override
     public float getFloat(String key)
     {
         return this.getCurrentConfig().getFloat(key);
     }
 
+    @Override
     public int getInt(String key, int defaultValue)
     {
         return this.getCurrentConfig().getInt(key, defaultValue);
     }
 
+    @Override
     public int getInt(String key)
     {
         return this.getCurrentConfig().getInt(key);
     }
 
+    @Override
     public Integer getInteger(String key, Integer defaultValue)
     {
         return this.getCurrentConfig().getInteger(key, defaultValue);
     }
 
+    @Override
     public Iterator getKeys()
     {
         return this.getCurrentConfig().getKeys();
     }
 
+    @Override
     public Iterator getKeys(String prefix)
     {
         return this.getCurrentConfig().getKeys(prefix);
     }
 
+    @Override
     public List getList(String key, List defaultValue)
     {
         return this.getCurrentConfig().getList(key, defaultValue);
     }
 
+    @Override
     public List getList(String key)
     {
         return this.getCurrentConfig().getList(key);
     }
 
+    @Override
     public long getLong(String key, long defaultValue)
     {
         return this.getCurrentConfig().getLong(key, defaultValue);
     }
 
+    @Override
     public Long getLong(String key, Long defaultValue)
     {
         return this.getCurrentConfig().getLong(key, defaultValue);
     }
 
+    @Override
     public long getLong(String key)
     {
         return this.getCurrentConfig().getLong(key);
     }
 
+    @Override
     public Properties getProperties(String key)
     {
         return this.getCurrentConfig().getProperties(key);
     }
 
+    @Override
     public Object getProperty(String key)
     {
         return this.getCurrentConfig().getProperty(key);
     }
 
+    @Override
     public short getShort(String key, short defaultValue)
     {
         return this.getCurrentConfig().getShort(key, defaultValue);
     }
 
+    @Override
     public Short getShort(String key, Short defaultValue)
     {
         return this.getCurrentConfig().getShort(key, defaultValue);
     }
 
+    @Override
     public short getShort(String key)
     {
         return this.getCurrentConfig().getShort(key);
     }
 
+    @Override
     public String getString(String key, String defaultValue)
     {
         return this.getCurrentConfig().getString(key, defaultValue);
     }
 
+    @Override
     public String getString(String key)
     {
         return this.getCurrentConfig().getString(key);
     }
 
+    @Override
     public String[] getStringArray(String key)
     {
         return this.getCurrentConfig().getStringArray(key);
     }
 
+    @Override
     public boolean isEmpty()
     {
         return this.getCurrentConfig().isEmpty();
     }
 
+    @Override
     public void setProperty(String key, Object value)
     {
         if (configs != null)
@@ -516,16 +569,19 @@ public class DynamicCombinedConfiguratio
         }
     }
 
+    @Override
     public Configuration subset(String prefix)
     {
         return this.getCurrentConfig().subset(prefix);
     }
 
+    @Override
     public Node getRoot()
     {
         return this.getCurrentConfig().getRoot();
     }
 
+    @Override
     public void setRoot(Node node)
     {
         if (configs != null)
@@ -538,46 +594,55 @@ public class DynamicCombinedConfiguratio
         }
     }
 
+    @Override
     public ExpressionEngine getExpressionEngine()
     {
         return super.getExpressionEngine();
     }
 
+    @Override
     public void setExpressionEngine(ExpressionEngine expressionEngine)
     {
         super.setExpressionEngine(expressionEngine);
     }
 
+    @Override
     public void addNodes(String key, Collection nodes)
     {
         this.getCurrentConfig().addNodes(key, nodes);
     }
 
+    @Override
     public SubnodeConfiguration configurationAt(String key, boolean supportUpdates)
     {
         return this.getCurrentConfig().configurationAt(key, supportUpdates);
     }
 
+    @Override
     public SubnodeConfiguration configurationAt(String key)
     {
         return this.getCurrentConfig().configurationAt(key);
     }
 
+    @Override
     public List configurationsAt(String key)
     {
         return this.getCurrentConfig().configurationsAt(key);
     }
 
+    @Override
     public void clearTree(String key)
     {
         this.getCurrentConfig().clearTree(key);
     }
 
+    @Override
     public int getMaxIndex(String key)
     {
         return this.getCurrentConfig().getMaxIndex(key);
     }
 
+    @Override
     public Configuration interpolatedConfiguration()
     {
         return this.getCurrentConfig().interpolatedConfiguration();
@@ -606,6 +671,7 @@ public class DynamicCombinedConfiguratio
      * @throws IllegalArgumentException if the key maps to multiple properties
      * and the source cannot be determined, or if the key is <b>null</b>
      */
+    @Override
     public Configuration getSource(String key)
     {
         if (key == null)
@@ -615,6 +681,7 @@ public class DynamicCombinedConfiguratio
         return getCurrentConfig().getSource(key);
     }
 
+    @Override
     public void addConfigurationListener(ConfigurationListener l)
     {
         super.addConfigurationListener(l);
@@ -627,6 +694,7 @@ public class DynamicCombinedConfiguratio
         }
     }
 
+    @Override
     public boolean removeConfigurationListener(ConfigurationListener l)
     {
         Iterator iter = configs.values().iterator();
@@ -638,11 +706,13 @@ public class DynamicCombinedConfiguratio
         return super.removeConfigurationListener(l);
     }
 
+    @Override
     public Collection getConfigurationListeners()
     {
         return super.getConfigurationListeners();
     }
 
+    @Override
     public void clearConfigurationListeners()
     {
         Iterator iter = configs.values().iterator();
@@ -654,6 +724,7 @@ public class DynamicCombinedConfiguratio
         super.clearConfigurationListeners();
     }
 
+    @Override
     public void addErrorListener(ConfigurationErrorListener l)
     {
         Iterator iter = configs.values().iterator();
@@ -665,6 +736,7 @@ public class DynamicCombinedConfiguratio
         super.addErrorListener(l);
     }
 
+    @Override
     public boolean removeErrorListener(ConfigurationErrorListener l)
     {
         Iterator iter = configs.values().iterator();
@@ -676,6 +748,7 @@ public class DynamicCombinedConfiguratio
         return super.removeErrorListener(l);
     }
 
+    @Override
     public void clearErrorListeners()
     {
         Iterator iter = configs.values().iterator();
@@ -687,6 +760,7 @@ public class DynamicCombinedConfiguratio
         super.clearErrorListeners();
     }
 
+    @Override
     public Collection getErrorListeners()
     {
         return super.getErrorListeners();
@@ -703,9 +777,10 @@ public class DynamicCombinedConfiguratio
      *
      * @return the copied object
      */
-    public Object clone()
+    @Override
+    public DynamicCombinedConfiguration clone()
     {
-        return super.clone();
+        return (DynamicCombinedConfiguration) super.clone();
     }
 
 
@@ -718,6 +793,7 @@ public class DynamicCombinedConfiguratio
      * events most times appear twice (once before and once after an update),
      * this event is only fired once (after update).
      */
+    @Override
     public void invalidate()
     {
         getCurrentConfig().invalidate();
@@ -742,6 +818,7 @@ public class DynamicCombinedConfiguratio
      * @param key The key to resolve.
      * @return The value of the key.
      */
+    @Override
     protected Object resolveContainerStore(String key)
     {
         if (((Boolean) recursive.get()).booleanValue())