commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1067777 - in /commons/proper/configuration/branches/configuration2_experimental/src: main/java/org/apache/commons/configuration2/beanutils/ test/java/org/apache/commons/configuration2/beanutils/
Date Sun, 06 Feb 2011 21:32:31 GMT
Author: oheger
Date: Sun Feb  6 21:32:31 2011
New Revision: 1067777

URL: http://svn.apache.org/viewvc?rev=1067777&view=rev
Log:
Fixed some Eclipse warnings (mostly type-safety).

Modified:
    commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/beanutils/ConfigurationDynaBean.java
    commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/beanutils/TestConfigurationDynaBean.java

Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/beanutils/ConfigurationDynaBean.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/beanutils/ConfigurationDynaBean.java?rev=1067777&r1=1067776&r2=1067777&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/beanutils/ConfigurationDynaBean.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/beanutils/ConfigurationDynaBean.java
Sun Feb  6 21:32:31 2011
@@ -20,9 +20,6 @@ package org.apache.commons.configuration
 import java.lang.reflect.Array;
 import java.util.Collection;
 import java.util.List;
-import java.util.logging.Level;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 import org.apache.commons.beanutils.DynaBean;
 import org.apache.commons.beanutils.DynaClass;
@@ -30,6 +27,8 @@ import org.apache.commons.configuration2
 import org.apache.commons.configuration2.ConfigurationMap;
 import org.apache.commons.configuration2.ConversionException;
 import org.apache.commons.configuration2.SubsetConfiguration;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * The <tt>ConfigurationDynaBean</tt> dynamically reads and writes
@@ -92,7 +91,7 @@ public class ConfigurationDynaBean exten
 
         if (value instanceof Collection)
         {
-            for (Object item : (Collection) value)
+            for (Object item : (Collection<?>) value)
             {
                 getConfiguration().addProperty(name, item);
             }
@@ -157,7 +156,7 @@ public class ConfigurationDynaBean exten
     {
         try
         {
-            List list = getConfiguration().getList(name);
+            List<?> list = getConfiguration().getList(name);
             if (list.isEmpty())
             {
                 throw new IllegalArgumentException("Indexed property '" + name + "' does
not exist.");
@@ -205,7 +204,7 @@ public class ConfigurationDynaBean exten
             }
             else if (property instanceof List)
             {
-                List list = (List) property;
+                List<Object> list = (List<Object>) property;
                 list.set(index, value);
                 getConfiguration().setProperty(name, list);
             }

Modified: commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/beanutils/TestConfigurationDynaBean.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/beanutils/TestConfigurationDynaBean.java?rev=1067777&r1=1067776&r2=1067777&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/beanutils/TestConfigurationDynaBean.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/beanutils/TestConfigurationDynaBean.java
Sun Feb  6 21:32:31 2011
@@ -119,7 +119,7 @@ public class TestConfigurationDynaBean e
             configuration.addProperty("stringIndexed", stringArray[a]);
         }
 
-        List list = new ArrayList();
+        List<String> list = new ArrayList<String>();
         for (int i = 0; i < stringArray.length; i++)
         {
             list.add(stringArray[i]);
@@ -563,7 +563,7 @@ public class TestConfigurationDynaBean e
      */
     public void testSetArrayValue()
     {
-        MapConfiguration configuration = new MapConfiguration(new HashMap());
+        MapConfiguration configuration = new MapConfiguration(new HashMap<Object, Object>());
         configuration.getMap().put("objectArray", new Object[] {"value1", "value2", "value3"});
 
         ConfigurationDynaBean bean = new ConfigurationDynaBean(configuration);
@@ -713,7 +713,7 @@ public class TestConfigurationDynaBean e
      * @param name Name of the property to be retrieved
      * @param type Expected class type of this property
      */
-    protected void testGetDescriptorBase(String name, Class type)
+    protected void testGetDescriptorBase(String name, Class<?> type)
     {
         DynaProperty descriptor = bean.getDynaClass().getDynaProperty(name);
 



Mime
View raw message