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 2022/05/21 15:26:52 UTC

[commons-configuration] branch master updated (6cd99767 -> 00a1b496)

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 6cd99767 Bump spotbugs-maven-plugin from 4.6.0.0 to 4.7.0.0
     new 26b7dae5 Fix Javadoc running on Java 1.8.0_322 on macOS.
     new 00a1b496 Fix generics compiler warnings.

The 2 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:
 .../java/org/apache/commons/configuration2/YAMLConfiguration.java | 8 ++++----
 .../configuration2/interpol/ConfigurationInterpolator.java        | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)


[commons-configuration] 02/02: Fix generics compiler warnings.

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 00a1b496409fc9943292a5568ebc8a945cafc71c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat May 21 11:26:47 2022 -0400

    Fix generics compiler warnings.
---
 .../java/org/apache/commons/configuration2/YAMLConfiguration.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/commons/configuration2/YAMLConfiguration.java b/src/main/java/org/apache/commons/configuration2/YAMLConfiguration.java
index 4f918439..705c2a21 100644
--- a/src/main/java/org/apache/commons/configuration2/YAMLConfiguration.java
+++ b/src/main/java/org/apache/commons/configuration2/YAMLConfiguration.java
@@ -60,7 +60,7 @@ public class YAMLConfiguration extends AbstractYAMLBasedConfiguration implements
     public void read(final Reader in) throws ConfigurationException {
         try {
             final Yaml yaml = createYamlForReading(new LoaderOptions());
-            final Map<String, Object> map = (Map) yaml.load(in);
+            final Map<String, Object> map = yaml.load(in);
             load(map);
         } catch (final Exception e) {
             rethrowException(e);
@@ -70,7 +70,7 @@ public class YAMLConfiguration extends AbstractYAMLBasedConfiguration implements
     public void read(final Reader in, final LoaderOptions options) throws ConfigurationException {
         try {
             final Yaml yaml = createYamlForReading(options);
-            final Map<String, Object> map = (Map) yaml.load(in);
+            final Map<String, Object> map = yaml.load(in);
             load(map);
         } catch (final Exception e) {
             rethrowException(e);
@@ -99,7 +99,7 @@ public class YAMLConfiguration extends AbstractYAMLBasedConfiguration implements
     public void read(final InputStream in) throws ConfigurationException {
         try {
             final Yaml yaml = createYamlForReading(new LoaderOptions());
-            final Map<String, Object> map = (Map) yaml.load(in);
+            final Map<String, Object> map = yaml.load(in);
             load(map);
         } catch (final Exception e) {
             rethrowException(e);
@@ -109,7 +109,7 @@ public class YAMLConfiguration extends AbstractYAMLBasedConfiguration implements
     public void read(final InputStream in, final LoaderOptions options) throws ConfigurationException {
         try {
             final Yaml yaml = createYamlForReading(options);
-            final Map<String, Object> map = (Map) yaml.load(in);
+            final Map<String, Object> map = yaml.load(in);
             load(map);
         } catch (final Exception e) {
             rethrowException(e);


[commons-configuration] 01/02: Fix Javadoc running on Java 1.8.0_322 on macOS.

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 26b7dae5a0fa2730338bbe1ca0611c2d5a16d5e0
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat May 21 11:26:31 2022 -0400

    Fix Javadoc running on Java 1.8.0_322 on macOS.
    
    For some reason, this did not break GitHub builds. There are still
    plenty of Javadoc warnings though.
---
 .../commons/configuration2/interpol/ConfigurationInterpolator.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/commons/configuration2/interpol/ConfigurationInterpolator.java b/src/main/java/org/apache/commons/configuration2/interpol/ConfigurationInterpolator.java
index 4f610bba..121875c3 100644
--- a/src/main/java/org/apache/commons/configuration2/interpol/ConfigurationInterpolator.java
+++ b/src/main/java/org/apache/commons/configuration2/interpol/ConfigurationInterpolator.java
@@ -72,10 +72,10 @@ import org.apache.commons.text.lookup.DefaultStringLookup;
  * <p>
  * When variables are part of larger interpolated strings, the variable values, which can be of any type, must be
  * converted to strings to produce the full result. Each interpolator instance has a configurable
- * {@link #setStringConverter() string converter} to perform this conversion. The default implementation of this
+ * {@link #setStringConverter(Function) string converter} to perform this conversion. The default implementation of this
  * function simply uses the value's {@code toString} method in the majority of cases. However, for maximum
  * consistency with
- * {@link org.apache.commons.configuration3convert.DefaultConversionHandler DefaultConversionHandler}, when a variable
+ * {@link org.apache.commons.configuration2.convert.DefaultConversionHandler DefaultConversionHandler}, when a variable
  * value is a container type (such as a collection or array), then only the first element of the container is converted
  * to a string instead of the container itself. For example, if the variable {@code x} resolves to the integer array
  * {@code [1, 2, 3]}, then the string <code>"my value = ${x}"</code> will by default be interpolated to
@@ -323,12 +323,12 @@ public class ConfigurationInterpolator {
      * <p>
      * For the following examples, assume that the default string conversion function is in place and that the
      * variable {@code i} maps to the integer value {@code 42}.
+     * </p>
      * <pre>
      *      interpolator.interpolate(1) &rarr; 1 // non-string argument returned unchanged
      *      interpolator.interpolate("${i}") &rarr; 42 // single variable value returned with raw type
      *      interpolator.interpolate("answer = ${i}") &rarr; "answer = 42" // variable value converted to string
      * </pre>
-     * </p>
      *
      * @param value the value to be interpolated
      * @return the interpolated value