commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject svn commit: r647706 - in /commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2: ./ beanutils/
Date Mon, 14 Apr 2008 09:01:28 GMT
Author: ebourg
Date: Mon Apr 14 02:01:20 2008
New Revision: 647706

URL: http://svn.apache.org/viewvc?rev=647706&view=rev
Log:
Minor generification changes

Modified:
    commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/ConfigurationUtils.java
    commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/INIConfiguration.java
    commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/StrictConfigurationComparator.java
    commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/beanutils/ConfigurationDynaClass.java

Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/ConfigurationUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/ConfigurationUtils.java?rev=647706&r1=647705&r2=647706&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/ConfigurationUtils.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/ConfigurationUtils.java
Mon Apr 14 02:01:20 2008
@@ -88,10 +88,10 @@
      */
     public static void dump(Configuration configuration, PrintWriter out)
     {
-        Iterator keys = configuration.getKeys();
+        Iterator<String> keys = configuration.getKeys();
         while (keys.hasNext())
         {
-            String key = (String) keys.next();
+            String key = keys.next();
             Object value = configuration.getProperty(key);
             out.print(key);
             out.print("=");
@@ -136,10 +136,10 @@
      */
     public static void copy(Configuration source, Configuration target)
     {
-        Iterator keys = source.getKeys();
+        Iterator<String> keys = source.getKeys();
         while (keys.hasNext())
         {
-            String key = (String) keys.next();
+            String key = keys.next();
             target.setProperty(key, source.getProperty(key));
         }
     }
@@ -160,10 +160,10 @@
      */
     public static void append(Configuration source, Configuration target)
     {
-        Iterator keys = source.getKeys();
+        Iterator<String> keys = source.getKeys();
         while (keys.hasNext())
         {
-            String key = (String) keys.next();
+            String key = keys.next();
             target.addProperty(key, source.getProperty(key));
         }
     }

Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/INIConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/INIConfiguration.java?rev=647706&r1=647705&r2=647706&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/INIConfiguration.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/INIConfiguration.java
Mon Apr 14 02:01:20 2008
@@ -238,10 +238,10 @@
             out.println();
 
             Configuration subset = subset(section);
-            Iterator keys = subset.getKeys();
+            Iterator<String> keys = subset.getKeys();
             while (keys.hasNext())
             {
-                String key = (String) keys.next();
+                String key = keys.next();
                 Object value = subset.getProperty(key);
                 if (value instanceof Collection)
                 {

Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/StrictConfigurationComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/StrictConfigurationComparator.java?rev=647706&r1=647705&r2=647706&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/StrictConfigurationComparator.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/StrictConfigurationComparator.java
Mon Apr 14 02:01:20 2008
@@ -57,9 +57,9 @@
             return false;
         }
 
-        for (Iterator keys = a.getKeys(); keys.hasNext();)
+        for (Iterator<String> keys = a.getKeys(); keys.hasNext();)
         {
-            String key = (String) keys.next();
+            String key = keys.next();
             Object value = a.getProperty(key);
             if (!value.equals(b.getProperty(key)))
             {
@@ -67,9 +67,9 @@
             }
         }
 
-        for (Iterator keys = b.getKeys(); keys.hasNext();)
+        for (Iterator<String> keys = b.getKeys(); keys.hasNext();)
         {
-            String key = (String) keys.next();
+            String key = keys.next();
             Object value = b.getProperty(key);
             if (!value.equals(a.getProperty(key)))
             {

Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/beanutils/ConfigurationDynaClass.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/beanutils/ConfigurationDynaClass.java?rev=647706&r1=647705&r2=647706&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/beanutils/ConfigurationDynaClass.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/beanutils/ConfigurationDynaClass.java
Mon Apr 14 02:01:20 2008
@@ -125,11 +125,11 @@
             log.finest("getDynaProperties()");
         }
 
-        Iterator keys = configuration.getKeys();
+        Iterator<String> keys = configuration.getKeys();
         List<DynaProperty> properties = new ArrayList<DynaProperty>();
         while (keys.hasNext())
         {
-            String key = (String) keys.next();
+            String key = keys.next();
             DynaProperty property = getDynaProperty(key);
             properties.add(property);
         }



Mime
View raw message