commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1209685 - /commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/ConfigurationFactory.java
Date Fri, 02 Dec 2011 20:47:44 GMT
Author: oheger
Date: Fri Dec  2 20:47:44 2011
New Revision: 1209685

URL: http://svn.apache.org/viewvc?rev=1209685&view=rev
Log:
Another attempt to fix the GUMP build using an ugly cast.

Modified:
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/ConfigurationFactory.java

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/ConfigurationFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/ConfigurationFactory.java?rev=1209685&r1=1209684&r2=1209685&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/ConfigurationFactory.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/ConfigurationFactory.java
Fri Dec  2 20:47:44 2011
@@ -270,7 +270,12 @@ public class ConfigurationFactory
      */
     protected void enableDigesterSubstitutor(Digester digester)
     {
-        Map<Object, Object> systemProperties = System.getProperties();
+        // This is ugly, but it is safe because the Properties object returned
+        // by System.getProperties() (which is actually a Map<Object, Object>)
+        // contains only String keys.
+        @SuppressWarnings("unchecked")
+        Map<String, Object> systemProperties =
+                (Map<String, Object>) (Object) System.getProperties();
         MultiVariableExpander expander = new MultiVariableExpander();
         expander.addSource("$", systemProperties);
 



Mime
View raw message