commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1479372 - in /commons/proper/configuration/trunk/src: main/java/org/apache/commons/configuration/ main/java/org/apache/commons/configuration/web/ test/java/org/apache/commons/configuration/
Date Sun, 05 May 2013 20:18:24 GMT
Author: oheger
Date: Sun May  5 20:18:23 2013
New Revision: 1479372

URL: http://svn.apache.org/r1479372
Log:
Made getKeys() methods final in AbstractConfiguration.

New protected methods getKeysInternal() were added that can be overridded in
subclasses.

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/BaseConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/BaseHierarchicalConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/CompositeConfiguration.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/DatabaseConfiguration.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/JNDIConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/MapConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/PatternSubtreeConfigurationWrapper.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/SubsetConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/AppletConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletContextConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletFilterConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletRequestConfiguration.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/NonCloneableConfiguration.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestAbstractConfigurationBasicFeatures.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestAbstractConfigurationSynchronization.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=1479372&r1=1479371&r2=1479372&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:18:23 2013
@@ -835,15 +835,69 @@ public abstract class AbstractConfigurat
     }
 
     /**
+     * {@inheritDoc} This implementation takes care of synchronization and then
+     * delegates to {@code getKeysInternal()} for obtaining the actual iterator.
+     * Note that depending on a concrete implementation, an iteration may fail
+     * if the configuration is updated concurrently.
+     */
+    public final Iterator<String> getKeys()
+    {
+        getSynchronizer().beginRead();
+        try
+        {
+            return getKeysInternal();
+        }
+        finally
+        {
+            getSynchronizer().endRead();
+        }
+    }
+
+    /**
      * {@inheritDoc} This implementation returns keys that either match the
      * prefix or start with the prefix followed by a dot ('.'). So the call
      * {@code getKeys("db");} will find the keys {@code db},
      * {@code db.user}, or {@code db.password}, but not the key
      * {@code dbdriver}.
      */
-    public Iterator<String> getKeys(String prefix)
+    public final Iterator<String> getKeys(String prefix)
+    {
+        getSynchronizer().beginRead();
+        try
+        {
+            return getKeysInternal(prefix);
+        }
+        finally
+        {
+            getSynchronizer().endRead();
+        }
+    }
+
+    /**
+     * Actually creates an iterator for iterating over the keys in this
+     * configuration. This method is called by {@code getKeys()}, it has to be
+     * defined by concrete subclasses.
+     *
+     * @return an {@code Iterator} with all property keys in this configuration
+     * @since 2.0
+     */
+    protected abstract Iterator<String> getKeysInternal();
+
+    /**
+     * Returns an {@code Iterator} with all property keys starting with the
+     * specified prefix. This method is called by {@link #getKeys(String)}. It
+     * is fully implemented by delegating to {@code getKeysInternal()} and
+     * returning a special iterator which filters for the passed in prefix.
+     * Subclasses can override it if they can provide a more efficient way to
+     * iterate over specific keys only.
+     *
+     * @param prefix the prefix for the keys to be taken into account
+     * @return an {@code Iterator} returning the filtered keys
+     * @since 2.0
+     */
+    protected Iterator<String> getKeysInternal(String prefix)
     {
-        return new PrefixedKeysIterator(getKeys(), prefix);
+        return new PrefixedKeysIterator(getKeysInternal(), prefix);
     }
 
     /**

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=1479372&r1=1479371&r2=1479372&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 May  5 20:18:23 2013
@@ -150,7 +150,8 @@ public class BaseConfiguration extends A
      *
      * @return An Iterator.
      */
-    public Iterator<String> getKeys()
+    @Override
+    protected Iterator<String> getKeysInternal()
     {
         return store.keySet().iterator();
     }

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/BaseHierarchicalConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/BaseHierarchicalConfiguration.java?rev=1479372&r1=1479371&r2=1479372&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/BaseHierarchicalConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/BaseHierarchicalConfiguration.java
Sun May  5 20:18:23 2013
@@ -855,7 +855,8 @@ public class BaseHierarchicalConfigurati
      *
      * @return an iterator with the defined keys in this configuration
      */
-    public Iterator<String> getKeys()
+    @Override
+    protected Iterator<String> getKeysInternal()
     {
         DefinedKeysVisitor visitor = new DefinedKeysVisitor();
         getRootNode().visit(visitor);
@@ -875,7 +876,7 @@ public class BaseHierarchicalConfigurati
      * @return an iterator with the found keys
      */
     @Override
-    public Iterator<String> getKeys(String prefix)
+    protected Iterator<String> getKeysInternal(String prefix)
     {
         DefinedKeysVisitor visitor = new DefinedKeysVisitor(prefix);
         if (containsKey(prefix))

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/CompositeConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/CompositeConfiguration.java?rev=1479372&r1=1479371&r2=1479372&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/CompositeConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/CompositeConfiguration.java
Sun May  5 20:18:23 2013
@@ -276,7 +276,8 @@ implements Cloneable
         }
     }
 
-    public Iterator<String> getKeys()
+    @Override
+    protected Iterator<String> getKeysInternal()
     {
         Set<String> keys = new LinkedHashSet<String>();
         for (Configuration config : configList)
@@ -291,7 +292,7 @@ implements Cloneable
     }
 
     @Override
-    public Iterator<String> getKeys(String key)
+    protected Iterator<String> getKeysInternal(String key)
     {
         Set<String> keys = new LinkedHashSet<String>();
         for (Configuration config : configList)

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=1479372&r1=1479371&r2=1479372&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:18:23 2013
@@ -170,7 +170,8 @@ public class DataConfiguration extends A
         configuration.setProperty(key, value);
     }
 
-    public Iterator<String> getKeys()
+    @Override
+    protected Iterator<String> getKeysInternal()
     {
         return configuration.getKeys();
     }

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DatabaseConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DatabaseConfiguration.java?rev=1479372&r1=1479371&r2=1479372&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DatabaseConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DatabaseConfiguration.java
Sun May  5 20:18:23 2013
@@ -544,7 +544,8 @@ public class DatabaseConfiguration exten
      * @return an iterator with the contained keys (an empty iterator in case
      * of an error)
      */
-    public Iterator<String> getKeys()
+    @Override
+    protected Iterator<String> getKeysInternal()
     {
         final Collection<String> keys = new ArrayList<String>();
         new JdbcOperation<Collection<String>>(EVENT_READ_PROPERTY, null, null)

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=1479372&r1=1479371&r2=1479372&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:18:23 2013
@@ -471,13 +471,13 @@ public class DynamicCombinedConfiguratio
     }
 
     @Override
-    public Iterator<String> getKeys()
+    protected Iterator<String> getKeysInternal()
     {
         return this.getCurrentConfig().getKeys();
     }
 
     @Override
-    public Iterator<String> getKeys(String prefix)
+    protected Iterator<String> getKeysInternal(String prefix)
     {
         return this.getCurrentConfig().getKeys(prefix);
     }

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/JNDIConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/JNDIConfiguration.java?rev=1479372&r1=1479371&r2=1479372&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/JNDIConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/JNDIConfiguration.java
Sun May  5 20:18:23 2013
@@ -177,9 +177,10 @@ public class JNDIConfiguration extends A
      *
      * @return an iterator with all keys
      */
-    public Iterator<String> getKeys()
+    @Override
+    protected Iterator<String> getKeysInternal()
     {
-        return getKeys("");
+        return getKeysInternal("");
     }
 
     /**
@@ -190,7 +191,7 @@ public class JNDIConfiguration extends A
      * @return an iterator with the selected keys
      */
     @Override
-    public Iterator<String> getKeys(String prefix)
+    protected Iterator<String> getKeysInternal(String prefix)
     {
         // build the path
         String[] splitPath = StringUtils.split(prefix, ".");

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/MapConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/MapConfiguration.java?rev=1479372&r1=1479371&r2=1479372&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/MapConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/MapConfiguration.java
Sun May  5 20:18:23 2013
@@ -217,7 +217,8 @@ public class MapConfiguration extends Ab
         map.remove(key);
     }
 
-    public Iterator<String> getKeys()
+    @Override
+    protected Iterator<String> getKeysInternal()
     {
         return map.keySet().iterator();
     }

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=1479372&r1=1479371&r2=1479372&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:18:23 2013
@@ -221,13 +221,13 @@ public class PatternSubtreeConfiguration
     }
 
     @Override
-    public Iterator<String> getKeys()
+    protected Iterator<String> getKeysInternal()
     {
         return config.getKeys(makePath());
     }
 
     @Override
-    public Iterator<String> getKeys(String prefix)
+    protected Iterator<String> getKeysInternal(String prefix)
     {
         return config.getKeys(makePath(prefix));
     }

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/SubsetConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/SubsetConfiguration.java?rev=1479372&r1=1479371&r2=1479372&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/SubsetConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/SubsetConfiguration.java
Sun May  5 20:18:23 2013
@@ -189,12 +189,13 @@ public class SubsetConfiguration extends
     }
 
     @Override
-    public Iterator<String> getKeys(String prefix)
+    protected Iterator<String> getKeysInternal(String prefix)
     {
         return new SubsetIterator(parent.getKeys(getParentKey(prefix)));
     }
 
-    public Iterator<String> getKeys()
+    @Override
+    protected Iterator<String> getKeysInternal()
     {
         return new SubsetIterator(parent.getKeys(prefix));
     }

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/AppletConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/AppletConfiguration.java?rev=1479372&r1=1479371&r2=1479372&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/AppletConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/AppletConfiguration.java
Sun May  5 20:18:23 2013
@@ -52,7 +52,8 @@ public class AppletConfiguration extends
         return handleDelimiters(applet.getParameter(key));
     }
 
-    public Iterator<String> getKeys()
+    @Override
+    protected Iterator<String> getKeysInternal()
     {
         String[][] paramsInfo = applet.getParameterInfo();
         String[] keys = new String[paramsInfo != null ? paramsInfo.length : 0];

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletConfiguration.java?rev=1479372&r1=1479371&r2=1479372&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletConfiguration.java
Sun May  5 20:18:23 2013
@@ -65,7 +65,8 @@ public class ServletConfiguration extend
         return handleDelimiters(config.getInitParameter(key));
     }
 
-    public Iterator<String> getKeys()
+    @Override
+    protected Iterator<String> getKeysInternal()
     {
         // According to the documentation of getInitParameterNames() the
         // enumeration is of type String.

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletContextConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletContextConfiguration.java?rev=1479372&r1=1479371&r2=1479372&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletContextConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletContextConfiguration.java
Sun May  5 20:18:23 2013
@@ -66,7 +66,8 @@ public class ServletContextConfiguration
         return handleDelimiters(context.getInitParameter(key));
     }
 
-    public Iterator<String> getKeys()
+    @Override
+    protected Iterator<String> getKeysInternal()
     {
         // According to the documentation of getInitParameterNames() the
         // enumeration is of type String.

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletFilterConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletFilterConfiguration.java?rev=1479372&r1=1479371&r2=1479372&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletFilterConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletFilterConfiguration.java
Sun May  5 20:18:23 2013
@@ -53,7 +53,8 @@ public class ServletFilterConfiguration 
         return handleDelimiters(config.getInitParameter(key));
     }
 
-    public Iterator<String> getKeys()
+    @Override
+    protected Iterator<String> getKeysInternal()
     {
         // According to the documentation of getInitParameterNames() the
         // enumeration is of type String.

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletRequestConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletRequestConfiguration.java?rev=1479372&r1=1479371&r2=1479372&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletRequestConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/web/ServletRequestConfiguration.java
Sun May  5 20:18:23 2013
@@ -82,7 +82,8 @@ public class ServletRequestConfiguration
         }
     }
 
-    public Iterator<String> getKeys()
+    @Override
+    protected Iterator<String> getKeysInternal()
     {
         // According to the documentation of getParameterMap(), keys are Strings.
         @SuppressWarnings("unchecked")

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/NonCloneableConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/NonCloneableConfiguration.java?rev=1479372&r1=1479371&r2=1479372&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/NonCloneableConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/NonCloneableConfiguration.java
Sun May  5 20:18:23 2013
@@ -55,7 +55,8 @@ public class NonCloneableConfiguration e
     /**
      * Dummy implementation of this method.
      */
-    public Iterator<String> getKeys()
+    @Override
+    protected Iterator<String> getKeysInternal()
     {
         return null;
     }

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestAbstractConfigurationBasicFeatures.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestAbstractConfigurationBasicFeatures.java?rev=1479372&r1=1479371&r2=1479372&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestAbstractConfigurationBasicFeatures.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestAbstractConfigurationBasicFeatures.java
Sun May  5 20:18:23 2013
@@ -63,7 +63,7 @@ public class TestAbstractConfigurationBa
         {
             // return an iterator that does not support remove operations
             @Override
-            public Iterator<String> getKeys()
+            protected Iterator<String> getKeysInternal()
             {
                 Collection<String> keyCol = new ArrayList<String>();
                 CollectionUtils.addAll(keyCol, getUnderlyingConfiguration()
@@ -614,7 +614,8 @@ public class TestAbstractConfigurationBa
             return config.containsKey(key);
         }
 
-        public Iterator<String> getKeys()
+        @Override
+        protected Iterator<String> getKeysInternal()
         {
             return config.getKeys();
         }

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestAbstractConfigurationSynchronization.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestAbstractConfigurationSynchronization.java?rev=1479372&r1=1479371&r2=1479372&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestAbstractConfigurationSynchronization.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestAbstractConfigurationSynchronization.java
Sun May  5 20:18:23 2013
@@ -148,8 +148,6 @@ public class TestAbstractConfigurationSy
      * Tests whether getKeys() is correctly synchronized.
      */
     @Test
-    @Ignore
-    // TODO prevent subclasses from overriding containsKey()
     public void testGetKeysSychronized()
     {
         assertTrue("No keys", config.getKeys().hasNext());
@@ -157,6 +155,16 @@ public class TestAbstractConfigurationSy
     }
 
     /**
+     * Tests whether getKeys(String prefix) is correctly synchronized.
+     */
+    @Test
+    public void testGetKeysPrefixSynchronized()
+    {
+        config.getKeys("test");
+        sync.verify(Methods.BEGIN_READ, Methods.END_READ);
+    }
+
+    /**
      * Tests synchronization of subset().
      */
     @Test



Mime
View raw message