commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1730378 - in /commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2: builder/FileBasedBuilderParametersImpl.java io/FileHandler.java io/FileLocatorUtils.java
Date Sun, 14 Feb 2016 19:02:07 GMT
Author: oheger
Date: Sun Feb 14 19:02:07 2016
New Revision: 1730378

URL: http://svn.apache.org/viewvc?rev=1730378&view=rev
Log:
[CONFIGURATION-619] Made some fromParameters() methods more generic.

Rather than a Map<String, Object>, the more generic type Map<String, ?>
can be used.

Modified:
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/builder/FileBasedBuilderParametersImpl.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/io/FileHandler.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/io/FileLocatorUtils.java

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/builder/FileBasedBuilderParametersImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/builder/FileBasedBuilderParametersImpl.java?rev=1730378&r1=1730377&r2=1730378&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/builder/FileBasedBuilderParametersImpl.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/builder/FileBasedBuilderParametersImpl.java
Sun Feb 14 19:02:07 2016
@@ -101,7 +101,7 @@ public class FileBasedBuilderParametersI
      * @throws IllegalArgumentException if the map is <b>null</b>
      */
     public static FileBasedBuilderParametersImpl fromParameters(
-            Map<String, Object> params)
+            Map<String, ?> params)
     {
         return fromParameters(params, false);
     }
@@ -120,7 +120,7 @@ public class FileBasedBuilderParametersI
      * @throws IllegalArgumentException if the map is <b>null</b>
      */
     public static FileBasedBuilderParametersImpl fromParameters(
-            Map<String, Object> params, boolean createIfMissing)
+            Map<String, ?> params, boolean createIfMissing)
     {
         if (params == null)
         {
@@ -150,7 +150,7 @@ public class FileBasedBuilderParametersI
      * @return the newly created instance
      * @throws ClassCastException if the map contains invalid data
      */
-    public static FileBasedBuilderParametersImpl fromMap(Map<String, Object> map)
+    public static FileBasedBuilderParametersImpl fromMap(Map<String, ?> map)
     {
         FileBasedBuilderParametersImpl params =
                 new FileBasedBuilderParametersImpl(FileHandler.fromMap(map));

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/io/FileHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/io/FileHandler.java?rev=1730378&r1=1730377&r2=1730378&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/io/FileHandler.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/io/FileHandler.java
Sun Feb 14 19:02:07 2016
@@ -228,7 +228,7 @@ public class FileHandler
      * @return the newly created {@code FileHandler}
      * @see FileLocatorUtils#fromMap(Map)
      */
-    public static FileHandler fromMap(Map<String, Object> map)
+    public static FileHandler fromMap(Map<String, ?> map)
     {
         return new FileHandler(null, FileLocatorUtils.fromMap(map));
     }

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/io/FileLocatorUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/io/FileLocatorUtils.java?rev=1730378&r1=1730377&r2=1730378&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/io/FileLocatorUtils.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/io/FileLocatorUtils.java
Sun Feb 14 19:02:07 2016
@@ -179,7 +179,7 @@ public final class FileLocatorUtils
      * @return the new {@code FileLocator}
      * @throws ClassCastException if the map contains invalid data
      */
-    public static FileLocator fromMap(Map<String, Object> map)
+    public static FileLocator fromMap(Map<String, ?> map)
     {
         FileLocator.FileLocatorBuilder builder = fileLocator();
         if (map != null)



Mime
View raw message