You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/05/30 11:45:27 UTC

(commons-configuration) branch master updated (dbf231f4 -> 0e7400d8)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git


    from dbf231f4 [CONFIGURATION-846] Restore previous behavior allowing Spring to inject multiple values #425
     new 8075aa48 Sort members
     new 879b6746 Use final
     new 98437e87 Remove redundant keyword
     new 57002dfa Simplify if-else
     new 1f78b001 Remove redundant keyword
     new 436f3a48 Remove redundant keyword
     new 4f1b9092 Use final
     new b1336871 Use final
     new 7ec99c3b Use final
     new 4d57ed57 Use final
     new 2ac784b6 Use final
     new e867a474 Add missing @Override
     new c030f364 Use final
     new d16dac08 Use final
     new 549eb936 Use compact array notation
     new c530fe6c Use final
     new 24694b78 Use final
     new 5fa7ced3 Add missing @Override
     new dcc6a366 Use final
     new 1cd93a2f Add missing @Override
     new 158b81be Add missing @Override
     new 128f08d8 Add missing @Override
     new 99c7f7d8 Add missing @Override
     new 0e7400d8 Remove redundant keyword

The 24 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../commons/configuration2/BaseConfiguration.java  |   2 +-
 .../DynamicCombinedConfiguration.java              | 104 ++++++++++-----------
 .../commons/configuration2/JSONConfiguration.java  |   2 +-
 .../PatternSubtreeConfigurationWrapper.java        |   2 +-
 .../commons/configuration2/XMLConfiguration.java   |   2 +-
 .../builder/combined/ConfigurationDeclaration.java |  10 +-
 .../spring/ConfigurationPropertySource.java        |   6 +-
 .../configuration2/NonCloneableConfiguration.java  |   2 +-
 .../configuration2/TestAbstractConfiguration.java  |   4 +-
 .../TestAbstractConfigurationBasicFeatures.java    |   2 +-
 .../configuration2/TestConfigurationMap.java       |   7 +-
 .../configuration2/TestConfigurationSet.java       |   5 +-
 .../TestDefaultImmutableConfiguration.java         |   2 +-
 .../configuration2/TestMapConfiguration.java       |   1 +
 .../TestPropertiesConfiguration.java               |   4 +-
 .../beanutils/TestConfigurationDynaBean.java       |  32 +++----
 .../configuration2/interpol/TestExprLookup.java    |   2 +-
 .../spring/TestConfigurationPropertySource.java    |  20 ++--
 .../web/TestAppletConfiguration.java               |   1 +
 .../web/TestServletConfiguration.java              |   1 +
 .../web/TestServletContextConfiguration.java       |   1 +
 .../web/TestServletFilterConfiguration.java        |   1 +
 .../web/TestServletRequestConfiguration.java       |   1 +
 23 files changed, 111 insertions(+), 103 deletions(-)


(commons-configuration) 24/24: Remove redundant keyword

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit 0e7400d834cf29bfb62a7967d13eef806720c196
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:45:21 2024 -0400

    Remove redundant keyword
---
 src/main/java/org/apache/commons/configuration2/XMLConfiguration.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/configuration2/XMLConfiguration.java b/src/main/java/org/apache/commons/configuration2/XMLConfiguration.java
index e884756e..ed465733 100644
--- a/src/main/java/org/apache/commons/configuration2/XMLConfiguration.java
+++ b/src/main/java/org/apache/commons/configuration2/XMLConfiguration.java
@@ -944,7 +944,7 @@ public class XMLConfiguration extends BaseHierarchicalConfiguration implements F
         } catch (final SAXParseException spe) {
             throw new ConfigurationException("Error parsing " + source.getSystemId(), spe);
         } catch (final Exception e) {
-            this.getLogger().debug("Unable to load the configuration: " + e);
+            getLogger().debug("Unable to load the configuration: " + e);
             throw new ConfigurationException("Unable to load the configuration", e);
         }
     }


(commons-configuration) 04/24: Simplify if-else

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit 57002dfa3c678da9401533be8f5b284d3390543e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:41:37 2024 -0400

    Simplify if-else
---
 .../commons/configuration2/spring/ConfigurationPropertySource.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/commons/configuration2/spring/ConfigurationPropertySource.java b/src/main/java/org/apache/commons/configuration2/spring/ConfigurationPropertySource.java
index ad2931a0..6f544584 100644
--- a/src/main/java/org/apache/commons/configuration2/spring/ConfigurationPropertySource.java
+++ b/src/main/java/org/apache/commons/configuration2/spring/ConfigurationPropertySource.java
@@ -42,11 +42,11 @@ public class ConfigurationPropertySource extends EnumerablePropertySource<Config
         final String[] propValue = source.getStringArray(name);
         if (propValue == null || propValue.length == 0) {
             return null;
-        } else if (propValue.length == 1) {
+        }
+        if (propValue.length == 1) {
             return propValue[0];
-        } else {
-            return propValue;
         }
+        return propValue;
     }
 
     @Override


(commons-configuration) 13/24: Use final

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit c030f364f6e096b33fd8a01291fec551c1449169
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:43:37 2024 -0400

    Use final
---
 .../beanutils/TestConfigurationDynaBean.java       | 32 +++++++++++-----------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/test/java/org/apache/commons/configuration2/beanutils/TestConfigurationDynaBean.java b/src/test/java/org/apache/commons/configuration2/beanutils/TestConfigurationDynaBean.java
index ae631fac..7f579abd 100644
--- a/src/test/java/org/apache/commons/configuration2/beanutils/TestConfigurationDynaBean.java
+++ b/src/test/java/org/apache/commons/configuration2/beanutils/TestConfigurationDynaBean.java
@@ -53,22 +53,22 @@ public class TestConfigurationDynaBean {
      * The set of property names we expect to have returned when calling {@code getDynaProperties()}. You should update this
      * list when new properties are added to TestBean.
      */
-    private String[] properties = {"booleanProperty", "booleanSecond", "doubleProperty", "floatProperty", "intProperty", "longProperty", "mappedProperty.key1",
-        "mappedProperty.key2", "mappedProperty.key3", "mappedIntProperty.key1", "shortProperty", "stringProperty", "byteProperty", "charProperty"};
-
-    private Object[] values = {Boolean.TRUE, Boolean.TRUE, Double.MAX_VALUE, Float.MAX_VALUE, Integer.MAX_VALUE,
-        Long.MAX_VALUE, "First Value", "Second Value", "Third Value", Integer.MAX_VALUE, Short.MAX_VALUE,
-        "This is a string", Byte.MAX_VALUE, Character.MAX_VALUE};
-
-    private int[] intArray = {0, 10, 20, 30, 40};
-    private boolean[] booleanArray = {true, false, true, false, true};
-    private char[] charArray = {'a', 'b', 'c', 'd', 'e'};
-    private byte[] byteArray = {0, 10, 20, 30, 40};
-    private long[] longArray = {0, 10, 20, 30, 40};
-    private short[] shortArray = {0, 10, 20, 30, 40};
-    private float[] floatArray = {0, 10, 20, 30, 40};
-    private double[] doubleArray = {0.0, 10.0, 20.0, 30.0, 40.0};
-    private String[] stringArray = {"String 0", "String 1", "String 2", "String 3", "String 4"};
+    private final String[] properties = {"booleanProperty", "booleanSecond", "doubleProperty", "floatProperty", "intProperty", "longProperty",
+            "mappedProperty.key1", "mappedProperty.key2", "mappedProperty.key3", "mappedIntProperty.key1", "shortProperty", "stringProperty", "byteProperty",
+            "charProperty"};
+
+    private final Object[] values = {Boolean.TRUE, Boolean.TRUE, Double.MAX_VALUE, Float.MAX_VALUE, Integer.MAX_VALUE, Long.MAX_VALUE, "First Value",
+            "Second Value", "Third Value", Integer.MAX_VALUE, Short.MAX_VALUE, "This is a string", Byte.MAX_VALUE, Character.MAX_VALUE};
+
+    private final int[] intArray = {0, 10, 20, 30, 40};
+    private final boolean[] booleanArray = {true, false, true, false, true};
+    private final char[] charArray = {'a', 'b', 'c', 'd', 'e'};
+    private final byte[] byteArray = {0, 10, 20, 30, 40};
+    private final long[] longArray = {0, 10, 20, 30, 40};
+    private final short[] shortArray = {0, 10, 20, 30, 40};
+    private final float[] floatArray = {0, 10, 20, 30, 40};
+    private final double[] doubleArray = {0.0, 10.0, 20.0, 30.0, 40.0};
+    private final String[] stringArray = {"String 0", "String 1", "String 2", "String 3", "String 4"};
 
     /**
      * Creates the underlying configuration object for the dyna bean.


(commons-configuration) 15/24: Use compact array notation

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit 549eb936350c34cc336e39f6d7671eca634444c4
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:44:03 2024 -0400

    Use compact array notation
---
 .../configuration2/spring/TestConfigurationPropertySource.java        | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/commons/configuration2/spring/TestConfigurationPropertySource.java b/src/test/java/org/apache/commons/configuration2/spring/TestConfigurationPropertySource.java
index 0bbe13af..daffd03f 100644
--- a/src/test/java/org/apache/commons/configuration2/spring/TestConfigurationPropertySource.java
+++ b/src/test/java/org/apache/commons/configuration2/spring/TestConfigurationPropertySource.java
@@ -73,9 +73,9 @@ public class TestConfigurationPropertySource {
 
     private static final String TEST_SYSTEM_PROPERTY_VALUE = "${sys:" + TEST_SYSTEM_PROPERTY + "}";
 
-    private static final String[] TEST_LIST_PROPERTY_VALUE = new String[] {TEST_SYSTEM_PROPERTY_VALUE, TEST_VALUE};
+    private static final String[] TEST_LIST_PROPERTY_VALUE = {TEST_SYSTEM_PROPERTY_VALUE, TEST_VALUE};
 
-    private static final String[] TEST_LIST_VALUE = new String[] {TEST_SYSTEM_VALUE, TEST_VALUE};
+    private static final String[] TEST_LIST_VALUE = {TEST_SYSTEM_VALUE, TEST_VALUE};
 
     private static ConfigurationPropertySource createConfigPropertySource() {
         final PropertiesConfiguration propertiesConfiguration = new PropertiesConfiguration();


(commons-configuration) 10/24: Use final

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit 4d57ed57240f235b1edb6cc7138260143399d8ec
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:43:01 2024 -0400

    Use final
---
 .../org/apache/commons/configuration2/TestAbstractConfiguration.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/commons/configuration2/TestAbstractConfiguration.java b/src/test/java/org/apache/commons/configuration2/TestAbstractConfiguration.java
index 8d44833d..0c3ee32e 100644
--- a/src/test/java/org/apache/commons/configuration2/TestAbstractConfiguration.java
+++ b/src/test/java/org/apache/commons/configuration2/TestAbstractConfiguration.java
@@ -68,8 +68,8 @@ public abstract class TestAbstractConfiguration {
 
     @Test
     public void givenNullValueTestContains() {
-        AbstractConfiguration config = getConfiguration();
-        Iterator<String> keys = config.getKeys();
+        final AbstractConfiguration config = getConfiguration();
+        final Iterator<String> keys = config.getKeys();
         assertFalse(config.contains(keys, null));
         assertFalse(config.contains(keys, ""));
     }


(commons-configuration) 20/24: Add missing @Override

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit 1cd93a2f3ab47f377490b530e91f5b093da608ec
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:44:49 2024 -0400

    Add missing @Override
---
 .../org/apache/commons/configuration2/web/TestServletConfiguration.java  | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/test/java/org/apache/commons/configuration2/web/TestServletConfiguration.java b/src/test/java/org/apache/commons/configuration2/web/TestServletConfiguration.java
index 08d2ef4a..05e3bc27 100644
--- a/src/test/java/org/apache/commons/configuration2/web/TestServletConfiguration.java
+++ b/src/test/java/org/apache/commons/configuration2/web/TestServletConfiguration.java
@@ -99,6 +99,7 @@ public class TestServletConfiguration extends TestAbstractConfiguration {
         assertThrows(UnsupportedOperationException.class, super::testClearProperty);
     }
 
+    @Override
     @Test
     public void testContainsValue() {
         assertFalse(getConfiguration().containsValue(null));


(commons-configuration) 23/24: Add missing @Override

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit 99c7f7d8ed43bee7d7a13649f2c73f9b10903e0c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:45:12 2024 -0400

    Add missing @Override
---
 .../commons/configuration2/web/TestServletRequestConfiguration.java      | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/test/java/org/apache/commons/configuration2/web/TestServletRequestConfiguration.java b/src/test/java/org/apache/commons/configuration2/web/TestServletRequestConfiguration.java
index be3328a4..cd862c12 100644
--- a/src/test/java/org/apache/commons/configuration2/web/TestServletRequestConfiguration.java
+++ b/src/test/java/org/apache/commons/configuration2/web/TestServletRequestConfiguration.java
@@ -94,6 +94,7 @@ public class TestServletRequestConfiguration extends TestAbstractConfiguration {
         assertThrows(UnsupportedOperationException.class, super::testClearProperty);
     }
 
+    @Override
     @Test
     public void testContainsValue() {
         assertFalse(getConfiguration().containsValue(null));


(commons-configuration) 21/24: Add missing @Override

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit 158b81bead6c1232b73e481791f185194405c84c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:44:55 2024 -0400

    Add missing @Override
---
 .../commons/configuration2/web/TestServletContextConfiguration.java      | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/test/java/org/apache/commons/configuration2/web/TestServletContextConfiguration.java b/src/test/java/org/apache/commons/configuration2/web/TestServletContextConfiguration.java
index 77264720..7769c0eb 100644
--- a/src/test/java/org/apache/commons/configuration2/web/TestServletContextConfiguration.java
+++ b/src/test/java/org/apache/commons/configuration2/web/TestServletContextConfiguration.java
@@ -109,6 +109,7 @@ public class TestServletContextConfiguration extends TestAbstractConfiguration {
         assertThrows(UnsupportedOperationException.class, super::testClearProperty);
     }
 
+    @Override
     @Test
     public void testContainsValue() {
         assertFalse(getConfiguration().containsValue(null));


(commons-configuration) 18/24: Add missing @Override

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit 5fa7ced34088a1f0b94eab36ba04d53dec19a35c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:44:32 2024 -0400

    Add missing @Override
---
 .../java/org/apache/commons/configuration2/TestMapConfiguration.java     | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/test/java/org/apache/commons/configuration2/TestMapConfiguration.java b/src/test/java/org/apache/commons/configuration2/TestMapConfiguration.java
index ae5fe67e..f2e6c6ad 100644
--- a/src/test/java/org/apache/commons/configuration2/TestMapConfiguration.java
+++ b/src/test/java/org/apache/commons/configuration2/TestMapConfiguration.java
@@ -116,6 +116,7 @@ public class TestMapConfiguration extends TestAbstractConfiguration {
         assertEquals("value1", config.getString("key1"));
     }
 
+    @Override
     @Test
     public void testContainsValue() {
         assertFalse(getConfiguration().containsValue(null));


(commons-configuration) 22/24: Add missing @Override

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit 128f08d84806fefd6d29515dd77eca59db315dd6
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:45:02 2024 -0400

    Add missing @Override
---
 .../commons/configuration2/web/TestServletFilterConfiguration.java       | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/test/java/org/apache/commons/configuration2/web/TestServletFilterConfiguration.java b/src/test/java/org/apache/commons/configuration2/web/TestServletFilterConfiguration.java
index 0b6dd8de..c3de90fa 100644
--- a/src/test/java/org/apache/commons/configuration2/web/TestServletFilterConfiguration.java
+++ b/src/test/java/org/apache/commons/configuration2/web/TestServletFilterConfiguration.java
@@ -93,6 +93,7 @@ public class TestServletFilterConfiguration extends TestAbstractConfiguration {
         assertThrows(UnsupportedOperationException.class, super::testClearProperty);
     }
 
+    @Override
     @Test
     public void testContainsValue() {
         assertFalse(getConfiguration().containsValue(null));


(commons-configuration) 09/24: Use final

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit 7ec99c3b41620adc1464a1e6ef13d889db024511
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:42:54 2024 -0400

    Use final
---
 .../java/org/apache/commons/configuration2/interpol/TestExprLookup.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/commons/configuration2/interpol/TestExprLookup.java b/src/test/java/org/apache/commons/configuration2/interpol/TestExprLookup.java
index 27c7b181..8444b4fb 100644
--- a/src/test/java/org/apache/commons/configuration2/interpol/TestExprLookup.java
+++ b/src/test/java/org/apache/commons/configuration2/interpol/TestExprLookup.java
@@ -44,7 +44,7 @@ public class TestExprLookup {
 
     public static class Utility {
 
-        private String message;
+        private final String message;
 
         public Utility(final String msg) {
             this.message = msg;


(commons-configuration) 19/24: Use final

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit dcc6a36659e65945855df198ccccd93b7a25976a
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:44:43 2024 -0400

    Use final
---
 .../apache/commons/configuration2/TestPropertiesConfiguration.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/commons/configuration2/TestPropertiesConfiguration.java b/src/test/java/org/apache/commons/configuration2/TestPropertiesConfiguration.java
index dc75e9b2..99519cdf 100644
--- a/src/test/java/org/apache/commons/configuration2/TestPropertiesConfiguration.java
+++ b/src/test/java/org/apache/commons/configuration2/TestPropertiesConfiguration.java
@@ -556,8 +556,8 @@ public class TestPropertiesConfiguration {
 
     @Test
     void testConfiguration() throws ConfigurationException {
-        Configurations configManager = new Configurations();
-        Configuration config = configManager.properties("src/test/resources/config/test.properties");
+        final Configurations configManager = new Configurations();
+        final Configuration config = configManager.properties("src/test/resources/config/test.properties");
 
         assertTrue(config.containsValue("jndivalue2"));
         assertFalse(config.containsValue("notFound"));


(commons-configuration) 11/24: Use final

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit 2ac784b64d468634afb856b2653d186d4378a44c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:43:10 2024 -0400

    Use final
---
 .../commons/configuration2/TestAbstractConfigurationBasicFeatures.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/commons/configuration2/TestAbstractConfigurationBasicFeatures.java b/src/test/java/org/apache/commons/configuration2/TestAbstractConfigurationBasicFeatures.java
index 0acce27c..bdd218da 100644
--- a/src/test/java/org/apache/commons/configuration2/TestAbstractConfigurationBasicFeatures.java
+++ b/src/test/java/org/apache/commons/configuration2/TestAbstractConfigurationBasicFeatures.java
@@ -94,7 +94,7 @@ public class TestAbstractConfigurationBasicFeatures {
         }
 
         @Override
-        protected boolean containsValueInternal(Object value) {
+        protected boolean containsValueInternal(final Object value) {
             return config.containsValue(value);
         }
 


(commons-configuration) 05/24: Remove redundant keyword

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit 1f78b00121dc321b7bd756bdf808df83bf70d465
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:41:53 2024 -0400

    Remove redundant keyword
---
 .../DynamicCombinedConfiguration.java              | 104 ++++++++++-----------
 1 file changed, 52 insertions(+), 52 deletions(-)

diff --git a/src/main/java/org/apache/commons/configuration2/DynamicCombinedConfiguration.java b/src/main/java/org/apache/commons/configuration2/DynamicCombinedConfiguration.java
index 780af401..14444a72 100644
--- a/src/main/java/org/apache/commons/configuration2/DynamicCombinedConfiguration.java
+++ b/src/main/java/org/apache/commons/configuration2/DynamicCombinedConfiguration.java
@@ -267,12 +267,12 @@ public class DynamicCombinedConfiguration extends CombinedConfiguration {
 
     @Override
     protected void addNodesInternal(final String key, final Collection<? extends ImmutableNode> nodes) {
-        this.getCurrentConfig().addNodes(key, nodes);
+        getCurrentConfig().addNodes(key, nodes);
     }
 
     @Override
     protected void addPropertyInternal(final String key, final Object value) {
-        this.getCurrentConfig().addProperty(key, value);
+        getCurrentConfig().addProperty(key, value);
     }
 
     /**
@@ -324,38 +324,38 @@ public class DynamicCombinedConfiguration extends CombinedConfiguration {
 
     @Override
     protected void clearInternal() {
-        this.getCurrentConfig().clear();
+        getCurrentConfig().clear();
     }
 
     @Override
     protected void clearPropertyDirect(final String key) {
-        this.getCurrentConfig().clearProperty(key);
+        getCurrentConfig().clearProperty(key);
     }
 
     @Override
     protected Object clearTreeInternal(final String key) {
-        this.getCurrentConfig().clearTree(key);
+        getCurrentConfig().clearTree(key);
         return Collections.emptyList();
     }
 
     @Override
     public HierarchicalConfiguration<ImmutableNode> configurationAt(final String key) {
-        return this.getCurrentConfig().configurationAt(key);
+        return getCurrentConfig().configurationAt(key);
     }
 
     @Override
     public HierarchicalConfiguration<ImmutableNode> configurationAt(final String key, final boolean supportUpdates) {
-        return this.getCurrentConfig().configurationAt(key, supportUpdates);
+        return getCurrentConfig().configurationAt(key, supportUpdates);
     }
 
     @Override
     public List<HierarchicalConfiguration<ImmutableNode>> configurationsAt(final String key) {
-        return this.getCurrentConfig().configurationsAt(key);
+        return getCurrentConfig().configurationsAt(key);
     }
 
     @Override
     protected boolean containsKeyInternal(final String key) {
-        return this.getCurrentConfig().containsKey(key);
+        return getCurrentConfig().containsKey(key);
     }
 
     /**
@@ -364,8 +364,8 @@ public class DynamicCombinedConfiguration extends CombinedConfiguration {
      * @since 2.11.0
      */
     @Override
-    protected boolean containsValueInternal(Object value) {
-        return this.getCurrentConfig().contains(getKeys(), value);
+    protected boolean containsValueInternal(final Object value) {
+        return getCurrentConfig().contains(getKeys(), value);
     }
 
     /**
@@ -415,52 +415,52 @@ public class DynamicCombinedConfiguration extends CombinedConfiguration {
 
     @Override
     public BigDecimal getBigDecimal(final String key) {
-        return this.getCurrentConfig().getBigDecimal(key);
+        return getCurrentConfig().getBigDecimal(key);
     }
 
     @Override
     public BigDecimal getBigDecimal(final String key, final BigDecimal defaultValue) {
-        return this.getCurrentConfig().getBigDecimal(key, defaultValue);
+        return getCurrentConfig().getBigDecimal(key, defaultValue);
     }
 
     @Override
     public BigInteger getBigInteger(final String key) {
-        return this.getCurrentConfig().getBigInteger(key);
+        return getCurrentConfig().getBigInteger(key);
     }
 
     @Override
     public BigInteger getBigInteger(final String key, final BigInteger defaultValue) {
-        return this.getCurrentConfig().getBigInteger(key, defaultValue);
+        return getCurrentConfig().getBigInteger(key, defaultValue);
     }
 
     @Override
     public boolean getBoolean(final String key) {
-        return this.getCurrentConfig().getBoolean(key);
+        return getCurrentConfig().getBoolean(key);
     }
 
     @Override
     public boolean getBoolean(final String key, final boolean defaultValue) {
-        return this.getCurrentConfig().getBoolean(key, defaultValue);
+        return getCurrentConfig().getBoolean(key, defaultValue);
     }
 
     @Override
     public Boolean getBoolean(final String key, final Boolean defaultValue) {
-        return this.getCurrentConfig().getBoolean(key, defaultValue);
+        return getCurrentConfig().getBoolean(key, defaultValue);
     }
 
     @Override
     public byte getByte(final String key) {
-        return this.getCurrentConfig().getByte(key);
+        return getCurrentConfig().getByte(key);
     }
 
     @Override
     public byte getByte(final String key, final byte defaultValue) {
-        return this.getCurrentConfig().getByte(key, defaultValue);
+        return getCurrentConfig().getByte(key, defaultValue);
     }
 
     @Override
     public Byte getByte(final String key, final Byte defaultValue) {
-        return this.getCurrentConfig().getByte(key, defaultValue);
+        return getCurrentConfig().getByte(key, defaultValue);
     }
 
     /**
@@ -539,47 +539,47 @@ public class DynamicCombinedConfiguration extends CombinedConfiguration {
 
     @Override
     public double getDouble(final String key) {
-        return this.getCurrentConfig().getDouble(key);
+        return getCurrentConfig().getDouble(key);
     }
 
     @Override
     public double getDouble(final String key, final double defaultValue) {
-        return this.getCurrentConfig().getDouble(key, defaultValue);
+        return getCurrentConfig().getDouble(key, defaultValue);
     }
 
     @Override
     public Double getDouble(final String key, final Double defaultValue) {
-        return this.getCurrentConfig().getDouble(key, defaultValue);
+        return getCurrentConfig().getDouble(key, defaultValue);
     }
 
     @Override
     public float getFloat(final String key) {
-        return this.getCurrentConfig().getFloat(key);
+        return getCurrentConfig().getFloat(key);
     }
 
     @Override
     public float getFloat(final String key, final float defaultValue) {
-        return this.getCurrentConfig().getFloat(key, defaultValue);
+        return getCurrentConfig().getFloat(key, defaultValue);
     }
 
     @Override
     public Float getFloat(final String key, final Float defaultValue) {
-        return this.getCurrentConfig().getFloat(key, defaultValue);
+        return getCurrentConfig().getFloat(key, defaultValue);
     }
 
     @Override
     public int getInt(final String key) {
-        return this.getCurrentConfig().getInt(key);
+        return getCurrentConfig().getInt(key);
     }
 
     @Override
     public int getInt(final String key, final int defaultValue) {
-        return this.getCurrentConfig().getInt(key, defaultValue);
+        return getCurrentConfig().getInt(key, defaultValue);
     }
 
     @Override
     public Integer getInteger(final String key, final Integer defaultValue) {
-        return this.getCurrentConfig().getInteger(key, defaultValue);
+        return getCurrentConfig().getInteger(key, defaultValue);
     }
 
     public String getKeyPattern() {
@@ -588,42 +588,42 @@ public class DynamicCombinedConfiguration extends CombinedConfiguration {
 
     @Override
     protected Iterator<String> getKeysInternal() {
-        return this.getCurrentConfig().getKeys();
+        return getCurrentConfig().getKeys();
     }
 
     @Override
     protected Iterator<String> getKeysInternal(final String prefix) {
-        return this.getCurrentConfig().getKeys(prefix);
+        return getCurrentConfig().getKeys(prefix);
     }
 
     @Override
     public List<Object> getList(final String key) {
-        return this.getCurrentConfig().getList(key);
+        return getCurrentConfig().getList(key);
     }
 
     @Override
     public List<Object> getList(final String key, final List<?> defaultValue) {
-        return this.getCurrentConfig().getList(key, defaultValue);
+        return getCurrentConfig().getList(key, defaultValue);
     }
 
     @Override
     public long getLong(final String key) {
-        return this.getCurrentConfig().getLong(key);
+        return getCurrentConfig().getLong(key);
     }
 
     @Override
     public long getLong(final String key, final long defaultValue) {
-        return this.getCurrentConfig().getLong(key, defaultValue);
+        return getCurrentConfig().getLong(key, defaultValue);
     }
 
     @Override
     public Long getLong(final String key, final Long defaultValue) {
-        return this.getCurrentConfig().getLong(key, defaultValue);
+        return getCurrentConfig().getLong(key, defaultValue);
     }
 
     @Override
     protected int getMaxIndexInternal(final String key) {
-        return this.getCurrentConfig().getMaxIndex(key);
+        return getCurrentConfig().getMaxIndex(key);
     }
 
     /**
@@ -653,27 +653,27 @@ public class DynamicCombinedConfiguration extends CombinedConfiguration {
 
     @Override
     public Properties getProperties(final String key) {
-        return this.getCurrentConfig().getProperties(key);
+        return getCurrentConfig().getProperties(key);
     }
 
     @Override
     protected Object getPropertyInternal(final String key) {
-        return this.getCurrentConfig().getProperty(key);
+        return getCurrentConfig().getProperty(key);
     }
 
     @Override
     public short getShort(final String key) {
-        return this.getCurrentConfig().getShort(key);
+        return getCurrentConfig().getShort(key);
     }
 
     @Override
     public short getShort(final String key, final short defaultValue) {
-        return this.getCurrentConfig().getShort(key, defaultValue);
+        return getCurrentConfig().getShort(key, defaultValue);
     }
 
     @Override
     public Short getShort(final String key, final Short defaultValue) {
-        return this.getCurrentConfig().getShort(key, defaultValue);
+        return getCurrentConfig().getShort(key, defaultValue);
     }
 
     /**
@@ -704,17 +704,17 @@ public class DynamicCombinedConfiguration extends CombinedConfiguration {
 
     @Override
     public String getString(final String key) {
-        return this.getCurrentConfig().getString(key);
+        return getCurrentConfig().getString(key);
     }
 
     @Override
     public String getString(final String key, final String defaultValue) {
-        return this.getCurrentConfig().getString(key, defaultValue);
+        return getCurrentConfig().getString(key, defaultValue);
     }
 
     @Override
     public String[] getStringArray(final String key) {
-        return this.getCurrentConfig().getStringArray(key);
+        return getCurrentConfig().getStringArray(key);
     }
 
     /**
@@ -727,7 +727,7 @@ public class DynamicCombinedConfiguration extends CombinedConfiguration {
         if (loggerName != null) {
             config.setLogger(new ConfigurationLogger(loggerName));
         }
-        config.setExpressionEngine(this.getExpressionEngine());
+        config.setExpressionEngine(getExpressionEngine());
         config.setConversionExpressionEngine(getConversionExpressionEngine());
         config.setListDelimiterHandler(getListDelimiterHandler());
         copyEventListeners(config);
@@ -753,7 +753,7 @@ public class DynamicCombinedConfiguration extends CombinedConfiguration {
 
     @Override
     public Configuration interpolatedConfiguration() {
-        return this.getCurrentConfig().interpolatedConfiguration();
+        return getCurrentConfig().interpolatedConfiguration();
     }
 
     /**
@@ -773,7 +773,7 @@ public class DynamicCombinedConfiguration extends CombinedConfiguration {
 
     @Override
     protected boolean isEmptyInternal() {
-        return this.getCurrentConfig().isEmpty();
+        return getCurrentConfig().isEmpty();
     }
 
     /**
@@ -883,16 +883,16 @@ public class DynamicCombinedConfiguration extends CombinedConfiguration {
 
     @Override
     protected void setPropertyInternal(final String key, final Object value) {
-        this.getCurrentConfig().setProperty(key, value);
+        getCurrentConfig().setProperty(key, value);
     }
 
     @Override
     protected int sizeInternal() {
-        return this.getCurrentConfig().size();
+        return getCurrentConfig().size();
     }
 
     @Override
     public Configuration subset(final String prefix) {
-        return this.getCurrentConfig().subset(prefix);
+        return getCurrentConfig().subset(prefix);
     }
 }


(commons-configuration) 02/24: Use final

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit 879b6746a6cdfd193a86032cc4c4d3f6ad29fdcd
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:40:53 2024 -0400

    Use final
---
 src/main/java/org/apache/commons/configuration2/BaseConfiguration.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/configuration2/BaseConfiguration.java b/src/main/java/org/apache/commons/configuration2/BaseConfiguration.java
index 3a65de9a..16122c15 100644
--- a/src/main/java/org/apache/commons/configuration2/BaseConfiguration.java
+++ b/src/main/java/org/apache/commons/configuration2/BaseConfiguration.java
@@ -142,7 +142,7 @@ public class BaseConfiguration extends AbstractConfiguration implements Cloneabl
      * @since 2.11.0
      */
     @Override
-    protected boolean containsValueInternal(Object value) {
+    protected boolean containsValueInternal(final Object value) {
         return store.containsValue(value);
     }
 


(commons-configuration) 16/24: Use final

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit c530fe6cf226ec4a407b8334c0cfd9b8fdfa6b15
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:44:18 2024 -0400

    Use final
---
 .../java/org/apache/commons/configuration2/TestConfigurationSet.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/commons/configuration2/TestConfigurationSet.java b/src/test/java/org/apache/commons/configuration2/TestConfigurationSet.java
index 01cb1676..1f72a94c 100644
--- a/src/test/java/org/apache/commons/configuration2/TestConfigurationSet.java
+++ b/src/test/java/org/apache/commons/configuration2/TestConfigurationSet.java
@@ -33,9 +33,10 @@ public class TestConfigurationSet {
 
     private ConfigurationMap.ConfigurationSet set;
 
-    private String[] properties = {"booleanProperty", "doubleProperty", "floatProperty", "intProperty", "longProperty", "shortProperty", "stringProperty"};
+    private final String[] properties = {"booleanProperty", "doubleProperty", "floatProperty", "intProperty", "longProperty", "shortProperty",
+            "stringProperty"};
 
-    private Object[] values = {Boolean.TRUE, Double.valueOf(Double.MAX_VALUE), Float.valueOf(Float.MAX_VALUE), Integer.valueOf(Integer.MAX_VALUE),
+    private final Object[] values = {Boolean.TRUE, Double.valueOf(Double.MAX_VALUE), Float.valueOf(Float.MAX_VALUE), Integer.valueOf(Integer.MAX_VALUE),
         Long.valueOf(Long.MAX_VALUE), Short.valueOf(Short.MAX_VALUE), "This is a string"};
 
     /**


(commons-configuration) 06/24: Remove redundant keyword

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit 436f3a4871cebd3844f013de44cf15a06cf3fbad
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:42:01 2024 -0400

    Remove redundant keyword
---
 src/main/java/org/apache/commons/configuration2/JSONConfiguration.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/configuration2/JSONConfiguration.java b/src/main/java/org/apache/commons/configuration2/JSONConfiguration.java
index ee936e6d..889a3374 100644
--- a/src/main/java/org/apache/commons/configuration2/JSONConfiguration.java
+++ b/src/main/java/org/apache/commons/configuration2/JSONConfiguration.java
@@ -90,7 +90,7 @@ public class JSONConfiguration extends AbstractYAMLBasedConfiguration implements
 
     @Override
     public void write(final Writer out) throws ConfigurationException, IOException {
-        this.mapper.writer().writeValue(out, constructMap(this.getNodeModel().getNodeHandler().getRootNode()));
+        this.mapper.writer().writeValue(out, constructMap(getNodeModel().getNodeHandler().getRootNode()));
     }
 
 }


(commons-configuration) 12/24: Add missing @Override

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit e867a47451779fd848ce932bb4663e4b3dd45ada
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:43:24 2024 -0400

    Add missing @Override
---
 .../org/apache/commons/configuration2/web/TestAppletConfiguration.java   | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/test/java/org/apache/commons/configuration2/web/TestAppletConfiguration.java b/src/test/java/org/apache/commons/configuration2/web/TestAppletConfiguration.java
index 8f3c08c1..02e3263d 100644
--- a/src/test/java/org/apache/commons/configuration2/web/TestAppletConfiguration.java
+++ b/src/test/java/org/apache/commons/configuration2/web/TestAppletConfiguration.java
@@ -115,6 +115,7 @@ public class TestAppletConfiguration extends TestAbstractConfiguration {
         }
     }
 
+    @Override
     @Test
     public void testContainsValue() {
         assertFalse(getConfiguration().containsValue(null));


(commons-configuration) 03/24: Remove redundant keyword

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit 98437e8794422bec36b4a5d9738bbc10e1573ff1
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:41:12 2024 -0400

    Remove redundant keyword
---
 .../builder/combined/ConfigurationDeclaration.java             | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/main/java/org/apache/commons/configuration2/builder/combined/ConfigurationDeclaration.java b/src/main/java/org/apache/commons/configuration2/builder/combined/ConfigurationDeclaration.java
index e13dd49a..adb1e410 100644
--- a/src/main/java/org/apache/commons/configuration2/builder/combined/ConfigurationDeclaration.java
+++ b/src/main/java/org/apache/commons/configuration2/builder/combined/ConfigurationDeclaration.java
@@ -55,8 +55,8 @@ public class ConfigurationDeclaration extends XMLBeanDeclaration {
      * @return the value of the {@code at} attribute (can be <b>null</b>)
      */
     public String getAt() {
-        final String result = this.getConfiguration().getString(CombinedConfigurationBuilder.ATTR_AT_RES);
-        return result == null ? this.getConfiguration().getString(CombinedConfigurationBuilder.ATTR_AT) : result;
+        final String result = getConfiguration().getString(CombinedConfigurationBuilder.ATTR_AT_RES);
+        return result == null ? getConfiguration().getString(CombinedConfigurationBuilder.ATTR_AT) : result;
     }
 
     /**
@@ -108,7 +108,7 @@ public class ConfigurationDeclaration extends XMLBeanDeclaration {
      * @return the value of the {@code forceCreate} attribute
      */
     public boolean isForceCreate() {
-        return this.getConfiguration().getBoolean(CombinedConfigurationBuilder.ATTR_FORCECREATE, false);
+        return getConfiguration().getBoolean(CombinedConfigurationBuilder.ATTR_FORCECREATE, false);
     }
 
     /**
@@ -117,9 +117,9 @@ public class ConfigurationDeclaration extends XMLBeanDeclaration {
      * @return a flag if this declaration points to an optional configuration
      */
     public boolean isOptional() {
-        Boolean value = this.getConfiguration().getBoolean(CombinedConfigurationBuilder.ATTR_OPTIONAL_RES, null);
+        Boolean value = getConfiguration().getBoolean(CombinedConfigurationBuilder.ATTR_OPTIONAL_RES, null);
         if (value == null) {
-            value = this.getConfiguration().getBoolean(CombinedConfigurationBuilder.ATTR_OPTIONAL, Boolean.FALSE);
+            value = getConfiguration().getBoolean(CombinedConfigurationBuilder.ATTR_OPTIONAL, Boolean.FALSE);
         }
         return value.booleanValue();
     }


(commons-configuration) 14/24: Use final

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit d16dac08211a5780109af83516f7a60d72e854e3
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:43:48 2024 -0400

    Use final
---
 .../org/apache/commons/configuration2/TestConfigurationMap.java    | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/test/java/org/apache/commons/configuration2/TestConfigurationMap.java b/src/test/java/org/apache/commons/configuration2/TestConfigurationMap.java
index 00467a84..dfd0850d 100644
--- a/src/test/java/org/apache/commons/configuration2/TestConfigurationMap.java
+++ b/src/test/java/org/apache/commons/configuration2/TestConfigurationMap.java
@@ -31,10 +31,11 @@ public class TestConfigurationMap {
 
     private ConfigurationMap map;
 
-    private String[] properties = {"booleanProperty", "doubleProperty", "floatProperty", "intProperty", "longProperty", "shortProperty", "stringProperty"};
+    private final String[] properties = {"booleanProperty", "doubleProperty", "floatProperty", "intProperty", "longProperty", "shortProperty",
+            "stringProperty"};
 
-    private Object[] values = {Boolean.TRUE, Double.valueOf(Double.MAX_VALUE), Float.valueOf(Float.MAX_VALUE), Integer.valueOf(Integer.MAX_VALUE),
-        Long.valueOf(Long.MAX_VALUE), Short.valueOf(Short.MAX_VALUE), "This is a string"};
+    private final Object[] values = {Boolean.TRUE, Double.valueOf(Double.MAX_VALUE), Float.valueOf(Float.MAX_VALUE), Integer.valueOf(Integer.MAX_VALUE),
+            Long.valueOf(Long.MAX_VALUE), Short.valueOf(Short.MAX_VALUE), "This is a string"};
 
     /**
      * Sets up instance variables required by this test case.


(commons-configuration) 01/24: Sort members

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit 8075aa48a2618eb290ae3194f4a11544f60f4b7d
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:27:27 2024 -0400

    Sort members
---
 .../spring/TestConfigurationPropertySource.java          | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/test/java/org/apache/commons/configuration2/spring/TestConfigurationPropertySource.java b/src/test/java/org/apache/commons/configuration2/spring/TestConfigurationPropertySource.java
index 902888b8..0bbe13af 100644
--- a/src/test/java/org/apache/commons/configuration2/spring/TestConfigurationPropertySource.java
+++ b/src/test/java/org/apache/commons/configuration2/spring/TestConfigurationPropertySource.java
@@ -109,22 +109,22 @@ public class TestConfigurationPropertySource {
     private boolean booleanNullValue;
 
     @Test
-    public void testSystemPropertyValueInjection() {
-        assertEquals(TEST_SYSTEM_VALUE, systemPropertyValue);
+    public void testListValueInjection() {
+        assertArrayEquals(TEST_LIST_VALUE, listValue);
     }
 
     @Test
-    public void testValueInjection() {
-        assertEquals(TEST_VALUE, value);
+    public void testNullValueInjection() {
+        assertFalse(booleanNullValue);
     }
 
     @Test
-    public void testListValueInjection() {
-        assertArrayEquals(TEST_LIST_VALUE, listValue);
+    public void testSystemPropertyValueInjection() {
+        assertEquals(TEST_SYSTEM_VALUE, systemPropertyValue);
     }
 
     @Test
-    public void testNullValueInjection() {
-        assertFalse(booleanNullValue);
+    public void testValueInjection() {
+        assertEquals(TEST_VALUE, value);
     }
 }


(commons-configuration) 17/24: Use final

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit 24694b789a666aa3f02116cf63f79d4e11dcb283
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:44:25 2024 -0400

    Use final
---
 .../commons/configuration2/TestDefaultImmutableConfiguration.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/commons/configuration2/TestDefaultImmutableConfiguration.java b/src/test/java/org/apache/commons/configuration2/TestDefaultImmutableConfiguration.java
index 0245a7a2..b3950944 100644
--- a/src/test/java/org/apache/commons/configuration2/TestDefaultImmutableConfiguration.java
+++ b/src/test/java/org/apache/commons/configuration2/TestDefaultImmutableConfiguration.java
@@ -47,7 +47,7 @@ public class TestDefaultImmutableConfiguration {
     /** Tests default methods. This class MUST NOT override the default methods! */
     private static final class MapImmutableConfiguration implements ImmutableConfiguration {
 
-        private Map<String, Object> map = new HashMap<>();
+        private final Map<String, Object> map = new HashMap<>();
 
         @Override
         public boolean containsKey(final String key) {


(commons-configuration) 08/24: Use final

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit b13368715974e40b6ee07420932cb1a45589d471
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:42:19 2024 -0400

    Use final
---
 .../commons/configuration2/PatternSubtreeConfigurationWrapper.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/configuration2/PatternSubtreeConfigurationWrapper.java b/src/main/java/org/apache/commons/configuration2/PatternSubtreeConfigurationWrapper.java
index cc80de9a..8b722b6c 100644
--- a/src/main/java/org/apache/commons/configuration2/PatternSubtreeConfigurationWrapper.java
+++ b/src/main/java/org/apache/commons/configuration2/PatternSubtreeConfigurationWrapper.java
@@ -136,7 +136,7 @@ public class PatternSubtreeConfigurationWrapper extends BaseHierarchicalConfigur
      * @since 2.11.0
      */
     @Override
-    protected boolean containsValueInternal(Object value) {
+    protected boolean containsValueInternal(final Object value) {
         return config.containsValue(value);
     }
 


(commons-configuration) 07/24: Use final

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git

commit 4f1b909238fde652d4a23c33f8bd164c18102d73
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu May 30 07:42:09 2024 -0400

    Use final
---
 .../org/apache/commons/configuration2/NonCloneableConfiguration.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/commons/configuration2/NonCloneableConfiguration.java b/src/test/java/org/apache/commons/configuration2/NonCloneableConfiguration.java
index aa5759f9..e6eff230 100644
--- a/src/test/java/org/apache/commons/configuration2/NonCloneableConfiguration.java
+++ b/src/test/java/org/apache/commons/configuration2/NonCloneableConfiguration.java
@@ -51,7 +51,7 @@ public class NonCloneableConfiguration extends AbstractConfiguration {
      * @since 2.11.0
      */
     @Override
-    protected boolean containsValueInternal(Object value) {
+    protected boolean containsValueInternal(final Object value) {
         return false;
     }