commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1545071 - in /commons/proper/configuration/trunk/src: main/java/org/apache/commons/configuration/builder/fluent/ test/java/org/apache/commons/configuration/ test/java/org/apache/commons/configuration/builder/combined/ test/java/org/apache/...
Date Sun, 24 Nov 2013 20:36:23 GMT
Author: oheger
Date: Sun Nov 24 20:36:23 2013
New Revision: 1545071

URL: http://svn.apache.org/r1545071
Log:
Made Parameters a bean class.

The class will have state in future. Therefore, it can no longer provide its
services as a static utilities class.

Modified:
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/fluent/Parameters.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/DatabaseConfigurationTestHelper.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestBaseHierarchicalConfigurationSynchronization.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestDynamicCombinedConfiguration.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/combined/TestCombinedConfigurationBuilder.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/combined/TestCombinedConfigurationBuilderVFS.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/combined/TestReloadingCombinedConfigurationBuilderFileBased.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/fluent/TestParameters.java

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/fluent/Parameters.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/fluent/Parameters.java?rev=1545071&r1=1545070&r2=1545071&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/fluent/Parameters.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/fluent/Parameters.java
Sun Nov 24 20:36:23 2013
@@ -50,12 +50,13 @@ import org.apache.commons.configuration.
  * However, the inheritance structure of the parameter classes makes it
  * surprisingly difficult to provide such an API. This class comes to rescue by
  * defining a set of methods for the creation of interface-based parameter
- * objects offering a truely fluent API. The static methods provided can be
+ * objects offering a truly fluent API. The methods provided can be
  * called directly when setting up a configuration builder as shown in the
  * following example code fragment:
  *
  * <pre>
- * configurationBuilder.configure(Parameters.fileBased()
+ * Parameters params = new Parameters();
+ * configurationBuilder.configure(params.fileBased()
  *         .setThrowExceptionOnMissing(true).setEncoding(&quot;UTF-8&quot;)
  *         .setListDelimiter('#').setFileName(&quot;test.xml&quot;));
  * </pre>
@@ -68,19 +69,12 @@ import org.apache.commons.configuration.
 public final class Parameters
 {
     /**
-     * Private constructor. No instances can be created.
-     */
-    private Parameters()
-    {
-    }
-
-    /**
      * Creates a new instance of a parameters object for basic configuration
      * properties.
      *
      * @return the new parameters object
      */
-    public static BasicBuilderParameters basic()
+    public BasicBuilderParameters basic()
     {
         return new BasicBuilderParameters();
     }
@@ -91,7 +85,7 @@ public final class Parameters
      *
      * @return the new parameters object
      */
-    public static FileBasedBuilderParameters fileBased()
+    public FileBasedBuilderParameters fileBased()
     {
         return createParametersProxy(FileBasedBuilderParameters.class,
                 new FileBasedBuilderParametersImpl());
@@ -103,7 +97,7 @@ public final class Parameters
      *
      * @return the new parameters object
      */
-    public static CombinedBuilderParameters combined()
+    public CombinedBuilderParameters combined()
     {
         return createParametersProxy(CombinedBuilderParameters.class,
                 new CombinedBuilderParametersImpl());
@@ -114,7 +108,7 @@ public final class Parameters
      *
      * @return the new parameters object
      */
-    public static JndiBuilderParameters jndi()
+    public JndiBuilderParameters jndi()
     {
         return createParametersProxy(JndiBuilderParameters.class,
                 new JndiBuilderParametersImpl());
@@ -126,7 +120,7 @@ public final class Parameters
      *
      * @return the new parameters object
      */
-    public static HierarchicalBuilderParameters hierarchical()
+    public HierarchicalBuilderParameters hierarchical()
     {
         return createParametersProxy(HierarchicalBuilderParameters.class,
                 new HierarchicalBuilderParametersImpl());
@@ -137,7 +131,7 @@ public final class Parameters
      *
      * @return the new parameters object
      */
-    public static XMLBuilderParameters xml()
+    public XMLBuilderParameters xml()
     {
         return createParametersProxy(XMLBuilderParameters.class,
                 new XMLBuilderParametersImpl());
@@ -149,7 +143,7 @@ public final class Parameters
      *
      * @return the new parameters object
      */
-    public static PropertiesBuilderParameters properties()
+    public PropertiesBuilderParameters properties()
     {
         return createParametersProxy(PropertiesBuilderParameters.class,
                 new PropertiesBuilderParametersImpl());
@@ -161,7 +155,7 @@ public final class Parameters
      *
      * @return the new parameters object
      */
-    public static MultiFileBuilderParameters multiFile()
+    public MultiFileBuilderParameters multiFile()
     {
         return createParametersProxy(MultiFileBuilderParameters.class,
                 new MultiFileBuilderParametersImpl());
@@ -173,7 +167,7 @@ public final class Parameters
      *
      * @return the new parameters object
      */
-    public static DatabaseBuilderParameters database()
+    public DatabaseBuilderParameters database()
     {
         return createParametersProxy(DatabaseBuilderParameters.class,
                 new DatabaseBuilderParametersImpl());

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/DatabaseConfigurationTestHelper.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/DatabaseConfigurationTestHelper.java?rev=1545071&r1=1545070&r2=1545071&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/DatabaseConfigurationTestHelper.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/DatabaseConfigurationTestHelper.java
Sun Nov 24 20:36:23 2013
@@ -142,7 +142,7 @@ public class DatabaseConfigurationTestHe
      */
     public DatabaseBuilderParameters setUpDefaultParameters()
     {
-        return Parameters.database().setDataSource(getDatasource())
+        return new Parameters().database().setDataSource(getDatasource())
                 .setTable(TABLE).setKeyColumn(COL_KEY)
                 .setValueColumn(COL_VALUE).setAutoCommit(isAutoCommit());
     }

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestBaseHierarchicalConfigurationSynchronization.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestBaseHierarchicalConfigurationSynchronization.java?rev=1545071&r1=1545070&r2=1545071&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestBaseHierarchicalConfigurationSynchronization.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestBaseHierarchicalConfigurationSynchronization.java
Sun Nov 24 20:36:23 2013
@@ -339,7 +339,7 @@ public class TestBaseHierarchicalConfigu
         FileBasedConfigurationBuilder<XMLConfiguration> builder =
                 new FileBasedConfigurationBuilder<XMLConfiguration>(
                         XMLConfiguration.class);
-        builder.configure(Parameters.fileBased().setFile(testFile));
+        builder.configure(new Parameters().fileBased().setFile(testFile));
         config = builder.getConfiguration();
 
         CountDownLatch startLatch = new CountDownLatch(1);

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestDynamicCombinedConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestDynamicCombinedConfiguration.java?rev=1545071&r1=1545070&r2=1545071&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestDynamicCombinedConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestDynamicCombinedConfiguration.java
Sun Nov 24 20:36:23 2013
@@ -47,6 +47,7 @@ import org.apache.commons.configuration.
 import org.apache.commons.configuration.sync.LockMode;
 import org.apache.commons.configuration.sync.ReadWriteSynchronizer;
 import org.apache.commons.configuration.tree.xpath.XPathExpressionEngine;
+import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class TestDynamicCombinedConfiguration
@@ -65,6 +66,15 @@ public class TestDynamicCombinedConfigur
     /** Constant for the number of loops in the multi-thread tests. */
     private static final int LOOP_COUNT = 100;
 
+    /** A helper object for creating builder parameters. */
+    private static Parameters parameters;
+
+    @BeforeClass
+    public static void setUpOnce()
+    {
+        parameters = new Parameters();
+    }
+
     @Test
     public void testConfiguration() throws Exception
     {
@@ -76,14 +86,14 @@ public class TestDynamicCombinedConfigur
         config.setKeyPattern(PATTERN);
         ConfigurationBuilder<XMLConfiguration> multiBuilder =
                 new MultiFileConfigurationBuilder<XMLConfiguration>(
-                        XMLConfiguration.class).configure(Parameters
+                        XMLConfiguration.class).configure(parameters
                         .multiFile()
                         .setFilePattern(PATTERN1)
                         .setPrefixLookups(
                                 ConfigurationInterpolator
                                         .getDefaultPrefixLookups())
                         .setManagedBuilderParameters(
-                                Parameters.xml().setExpressionEngine(engine)
+                                parameters.xml().setExpressionEngine(engine)
                                         .setListDelimiterHandler(listHandler)));
         BuilderConfigurationWrapperFactory wrapFactory =
                 new BuilderConfigurationWrapperFactory();
@@ -119,7 +129,7 @@ public class TestDynamicCombinedConfigur
         System.getProperties().remove("Id");
         CombinedConfigurationBuilder builder =
                 new CombinedConfigurationBuilder();
-        builder.configure(Parameters.fileBased().setFile(MULTI_TENENT_FILE)
+        builder.configure(parameters.fileBased().setFile(MULTI_TENENT_FILE)
                 .setSynchronizer(new ReadWriteSynchronizer()));
         CombinedConfiguration config = builder.getConfiguration();
         config.getConfiguration(1).setProperty("rowsPerPage", "25");
@@ -230,7 +240,7 @@ public class TestDynamicCombinedConfigur
     {
         System.getProperties().remove("Id");
         CombinedConfigurationBuilder builder = new CombinedConfigurationBuilder();
-        builder.configure(Parameters.fileBased().setFile(MULTI_TENENT_FILE)
+        builder.configure(parameters.fileBased().setFile(MULTI_TENENT_FILE)
                 .setSynchronizer(new ReadWriteSynchronizer()));
         CombinedConfiguration config = builder.getConfiguration();
 
@@ -258,7 +268,7 @@ public class TestDynamicCombinedConfigur
     {
         System.getProperties().remove("Id");
         CombinedConfigurationBuilder builder = new CombinedConfigurationBuilder();
-        builder.configure(Parameters.fileBased().setFile(MULTI_TENENT_FILE)
+        builder.configure(parameters.fileBased().setFile(MULTI_TENENT_FILE)
                 .setSynchronizer(new ReadWriteSynchronizer()));
         CombinedConfiguration config = builder.getConfiguration();
 
@@ -289,7 +299,7 @@ public class TestDynamicCombinedConfigur
     {
         System.getProperties().remove("Id");
         CombinedConfigurationBuilder builder = new CombinedConfigurationBuilder();
-        builder.configure(Parameters.fileBased().setFile(MULTI_TENENT_FILE)
+        builder.configure(parameters.fileBased().setFile(MULTI_TENENT_FILE)
                 .setSynchronizer(new ReadWriteSynchronizer()));
         CombinedConfiguration config = builder.getConfiguration();
 
@@ -337,7 +347,7 @@ public class TestDynamicCombinedConfigur
 
         ReloadingCombinedConfigurationBuilder builder =
                 new ReloadingCombinedConfigurationBuilder();
-        builder.configure(Parameters
+        builder.configure(parameters
                 .combined()
                 .setSynchronizer(new ReadWriteSynchronizer())
                 .setDefinitionBuilderParameters(

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/combined/TestCombinedConfigurationBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/combined/TestCombinedConfigurationBuilder.java?rev=1545071&r1=1545070&r2=1545071&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/combined/TestCombinedConfigurationBuilder.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/combined/TestCombinedConfigurationBuilder.java
Sun Nov 24 20:36:23 2013
@@ -58,6 +58,7 @@ import org.apache.commons.configuration.
 import org.apache.commons.configuration.builder.PropertiesBuilderParametersImpl;
 import org.apache.commons.configuration.builder.ReloadingFileBasedConfigurationBuilder;
 import org.apache.commons.configuration.builder.XMLBuilderParametersImpl;
+import org.apache.commons.configuration.builder.fluent.FileBasedBuilderParameters;
 import org.apache.commons.configuration.builder.fluent.Parameters;
 import org.apache.commons.configuration.convert.DefaultListDelimiterHandler;
 import org.apache.commons.configuration.convert.ListDelimiterHandler;
@@ -102,6 +103,9 @@ public class TestCombinedConfigurationBu
      */
     private static final String MULTI_FILE_PROPERTY = "Id";
 
+    /** A helper object for creating builder parameters. */
+    protected Parameters parameters;
+
     /** Stores the object to be tested. */
     protected CombinedConfigurationBuilder builder;
 
@@ -112,6 +116,7 @@ public class TestCombinedConfigurationBu
                 "org.apache.commons.configuration.MockInitialContextFactory");
         System.setProperty("test_file_xml", TEST_SUB_XML);
         System.setProperty("test_file_combine", "testcombine1.xml");
+        parameters = new Parameters();
         builder = new CombinedConfigurationBuilder();
     }
 
@@ -162,9 +167,9 @@ public class TestCombinedConfigurationBu
      *
      * @return the parameters object
      */
-    protected FileBasedBuilderParametersImpl createParameters()
+    protected FileBasedBuilderParameters createParameters()
     {
-        return new FileBasedBuilderParametersImpl();
+        return parameters.fileBased();
     }
 
     /**
@@ -1016,12 +1021,12 @@ public class TestCombinedConfigurationBu
     {
         final Long defRefresh = 60000L;
         final Long xmlRefresh = 30000L;
-        builder.configure(Parameters
+        builder.configure(parameters
                 .combined()
                 .setDefinitionBuilderParameters(
-                        Parameters.fileBased().setFile(TEST_FILE))
+                        parameters.fileBased().setFile(TEST_FILE))
                 .addChildParameters(
-                        createParameters()
+                        new FileBasedBuilderParametersImpl()
                                 .setReloadingRefreshDelay(defRefresh)
                                 .setThrowExceptionOnMissing(true))
                 .addChildParameters(
@@ -1058,10 +1063,10 @@ public class TestCombinedConfigurationBu
     public void testInitChildBuilderParametersDefaultChildPropertiesEx()
             throws ConfigurationException
     {
-        builder.configure(Parameters
+        builder.configure(parameters
                 .combined()
                 .setDefinitionBuilderParameters(
-                        Parameters.fileBased().setFile(TEST_FILE))
+                        parameters.fileBased().setFile(TEST_FILE))
                 .addChildParameters(
                         new HierarchicalBuilderParametersImpl()
                                 .setExpressionEngine(new XPathExpressionEngine())));

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/combined/TestCombinedConfigurationBuilderVFS.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/combined/TestCombinedConfigurationBuilderVFS.java?rev=1545071&r1=1545070&r2=1545071&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/combined/TestCombinedConfigurationBuilderVFS.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/combined/TestCombinedConfigurationBuilderVFS.java
Sun Nov 24 20:36:23 2013
@@ -27,7 +27,7 @@ import org.apache.commons.configuration.
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.configuration.HierarchicalConfiguration;
 import org.apache.commons.configuration.builder.BasicConfigurationBuilder;
-import org.apache.commons.configuration.builder.FileBasedBuilderParametersImpl;
+import org.apache.commons.configuration.builder.fluent.FileBasedBuilderParameters;
 import org.apache.commons.configuration.io.VFSFileSystem;
 import org.junit.Test;
 
@@ -45,9 +45,9 @@ public class TestCombinedConfigurationBu
      * the VFS file system.
      */
     @Override
-    protected FileBasedBuilderParametersImpl createParameters()
+    protected FileBasedBuilderParameters createParameters()
     {
-        FileBasedBuilderParametersImpl params = super.createParameters();
+        FileBasedBuilderParameters params = super.createParameters();
         return params.setFileSystem(new VFSFileSystem());
     }
 

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/combined/TestReloadingCombinedConfigurationBuilderFileBased.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/combined/TestReloadingCombinedConfigurationBuilderFileBased.java?rev=1545071&r1=1545070&r2=1545071&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/combined/TestReloadingCombinedConfigurationBuilderFileBased.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/combined/TestReloadingCombinedConfigurationBuilderFileBased.java
Sun Nov 24 20:36:23 2013
@@ -72,12 +72,16 @@ public class TestReloadingCombinedConfig
     @Rule
     public TemporaryFolder folder = new TemporaryFolder();
 
+    /** A helper object for creating builder parameters. */
+    private Parameters parameters;
+
     /** The builder to be tested. */
     private ReloadingCombinedConfigurationBuilder builder;
 
     @Before
     public void setUp() throws Exception
     {
+        parameters = new Parameters();
         builder = new ReloadingCombinedConfigurationBuilder();
     }
 
@@ -186,7 +190,7 @@ public class TestReloadingCombinedConfig
         HierarchicalConfiguration defConf = new BaseHierarchicalConfiguration();
         addReloadSource(defConf, xmlConf1.getAbsolutePath());
         addReloadSource(defConf, xmlConf2.getAbsolutePath());
-        builder.configure(Parameters
+        builder.configure(parameters
                 .combined()
                 .setDefinitionBuilder(new ConstantConfigurationBuilder(defConf))
                 .addChildParameters(
@@ -242,7 +246,7 @@ public class TestReloadingCombinedConfig
         addReloadSource(defConf, "configA.xml");
         addReloadSource(defConf, "configB.xml");
         Synchronizer sync = new ReadWriteSynchronizer();
-        builder.configure(Parameters
+        builder.configure(parameters
                 .combined()
                 .setDefinitionBuilder(new ConstantConfigurationBuilder(defConf))
                 .setSynchronizer(sync)
@@ -318,9 +322,9 @@ public class TestReloadingCombinedConfig
             throws ConfigurationException, IOException, InterruptedException
     {
         File defFile = folder.newFile();
-        builder.configure(Parameters.combined().setDefinitionBuilder(
+        builder.configure(parameters.combined().setDefinitionBuilder(
                 new ReloadingFileBasedConfigurationBuilder<XMLConfiguration>(
-                        XMLConfiguration.class).configure(Parameters.xml()
+                        XMLConfiguration.class).configure(parameters.xml()
                         .setReloadingRefreshDelay(0L).setFile(defFile))));
         checkReloadDefinitionFile(defFile);
     }
@@ -334,8 +338,8 @@ public class TestReloadingCombinedConfig
             throws ConfigurationException, IOException, InterruptedException
     {
         File defFile = folder.newFile();
-        builder.configure(Parameters.combined().setDefinitionBuilderParameters(
-                Parameters.xml().setReloadingRefreshDelay(0L).setFile(defFile)));
+        builder.configure(parameters.combined().setDefinitionBuilderParameters(
+                parameters.xml().setReloadingRefreshDelay(0L).setFile(defFile)));
         checkReloadDefinitionFile(defFile);
     }
 

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/fluent/TestParameters.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/fluent/TestParameters.java?rev=1545071&r1=1545070&r2=1545071&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/fluent/TestParameters.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/fluent/TestParameters.java
Sun Nov 24 20:36:23 2013
@@ -32,6 +32,7 @@ import org.apache.commons.configuration.
 import org.apache.commons.configuration.convert.ListDelimiterHandler;
 import org.apache.commons.configuration.tree.ExpressionEngine;
 import org.easymock.EasyMock;
+import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -45,19 +46,28 @@ public class TestParameters
     /** A test list delimiter handler. */
     private static ListDelimiterHandler listHandler;
 
+    /** The parameters object to be tested. */
+    private Parameters parameters;
+
     @BeforeClass
     public static void setUpBeforeClass() throws Exception
     {
         listHandler = EasyMock.createMock(ListDelimiterHandler.class);
     }
 
+    @Before
+    public void setUp() throws Exception
+    {
+        parameters = new Parameters();
+    }
+
     /**
      * Tests whether a basic parameters object can be created.
      */
     @Test
     public void testBasic()
     {
-        BasicBuilderParameters basic = Parameters.basic();
+        BasicBuilderParameters basic = parameters.basic();
         assertNotNull("No result object", basic);
     }
 
@@ -82,7 +92,7 @@ public class TestParameters
     public void testFileBased()
     {
         Map<String, Object> map =
-                Parameters.fileBased().setThrowExceptionOnMissing(true)
+                parameters.fileBased().setThrowExceptionOnMissing(true)
                         .setEncoding("UTF-8").setListDelimiterHandler(listHandler)
                         .setFileName("test.xml").getParameters();
         FileBasedBuilderParametersImpl fbparams =
@@ -101,7 +111,7 @@ public class TestParameters
     @Test
     public void testProxyObjectMethods()
     {
-        FileBasedBuilderParameters params = Parameters.fileBased();
+        FileBasedBuilderParameters params = parameters.fileBased();
         String s = params.toString();
         assertTrue(
                 "Wrong string: " + s,
@@ -116,7 +126,7 @@ public class TestParameters
     public void testCombined()
     {
         Map<String, Object> map =
-                Parameters.combined().setThrowExceptionOnMissing(true)
+                parameters.combined().setThrowExceptionOnMissing(true)
                         .setBasePath("test").setListDelimiterHandler(listHandler)
                         .getParameters();
         CombinedBuilderParametersImpl cparams =
@@ -132,7 +142,7 @@ public class TestParameters
     public void testJndi()
     {
         Map<String, Object> map =
-                Parameters.jndi().setThrowExceptionOnMissing(true)
+                parameters.jndi().setThrowExceptionOnMissing(true)
                         .setPrefix("test").setListDelimiterHandler(listHandler)
                         .getParameters();
         assertEquals("Wrong prefix", "test", map.get("prefix"));
@@ -148,7 +158,7 @@ public class TestParameters
     {
         ExpressionEngine engine = EasyMock.createMock(ExpressionEngine.class);
         Map<String, Object> map =
-                Parameters.hierarchical().setThrowExceptionOnMissing(true)
+                parameters.hierarchical().setThrowExceptionOnMissing(true)
                         .setExpressionEngine(engine).setFileName("test.xml")
                         .setListDelimiterHandler(listHandler).getParameters();
         checkBasicProperties(map);
@@ -169,7 +179,7 @@ public class TestParameters
     {
         ExpressionEngine engine = EasyMock.createMock(ExpressionEngine.class);
         Map<String, Object> map =
-                Parameters.xml().setThrowExceptionOnMissing(true)
+                parameters.xml().setThrowExceptionOnMissing(true)
                         .setFileName("test.xml").setValidating(true)
                         .setExpressionEngine(engine).setListDelimiterHandler(listHandler)
                         .setSchemaValidation(true).getParameters();
@@ -196,7 +206,7 @@ public class TestParameters
         PropertiesConfiguration.IOFactory factory =
                 EasyMock.createMock(PropertiesConfiguration.IOFactory.class);
         Map<String, Object> map =
-                Parameters.properties().setThrowExceptionOnMissing(true)
+                parameters.properties().setThrowExceptionOnMissing(true)
                         .setFileName("test.properties").setIOFactory(factory)
                         .setListDelimiterHandler(listHandler).setIncludesAllowed(false)
                         .getParameters();
@@ -219,7 +229,7 @@ public class TestParameters
         BuilderParameters bp = EasyMock.createMock(BuilderParameters.class);
         String pattern = "a pattern";
         Map<String, Object> map =
-                Parameters.multiFile().setThrowExceptionOnMissing(true)
+                parameters.multiFile().setThrowExceptionOnMissing(true)
                         .setFilePattern(pattern).setListDelimiterHandler(listHandler)
                         .setManagedBuilderParameters(bp).getParameters();
         checkBasicProperties(map);
@@ -238,7 +248,7 @@ public class TestParameters
     public void testDatabase()
     {
         Map<String, Object> map =
-                Parameters.database().setThrowExceptionOnMissing(true)
+                parameters.database().setThrowExceptionOnMissing(true)
                         .setAutoCommit(true).setTable("table")
                         .setListDelimiterHandler(listHandler).setKeyColumn("keyColumn")
                         .getParameters();



Mime
View raw message