commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r745079 - in /commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils: ConvertUtilsBean.java LazyDynaList.java
Date Tue, 17 Feb 2009 14:04:10 GMT
Author: sebb
Date: Tue Feb 17 14:04:10 2009
New Revision: 745079

URL: http://svn.apache.org/viewvc?rev=745079&view=rev
Log:
Remove unnecessary casts

Modified:
    commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/ConvertUtilsBean.java
    commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/LazyDynaList.java

Modified: commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/ConvertUtilsBean.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/ConvertUtilsBean.java?rev=745079&r1=745078&r2=745079&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/ConvertUtilsBean.java
(original)
+++ commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/ConvertUtilsBean.java
Tue Feb 17 14:04:10 2009
@@ -424,14 +424,14 @@
     public String convert(Object value) {
 
         if (value == null) {
-            return ((String) null);
+            return null;
         } else if (value.getClass().isArray()) {
             if (Array.getLength(value) < 1) {
                 return (null);
             }
             value = Array.get(value, 0);
             if (value == null) {
-                return ((String) null);
+                return null;
             } else {
                 Converter converter = lookup(String.class);
                 return ((String) converter.convert(String.class, value));

Modified: commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/LazyDynaList.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/LazyDynaList.java?rev=745079&r1=745078&r2=745079&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/LazyDynaList.java
(original)
+++ commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/LazyDynaList.java
Tue Feb 17 14:04:10 2009
@@ -417,7 +417,7 @@
             if (Map.class.isAssignableFrom(elementType)) {
                 array[i] = ((LazyDynaMap)get(i)).getMap(); 
             } else if (DynaBean.class.isAssignableFrom(elementType)) {
-                array[i] = (DynaBean)get(i);
+                array[i] = get(i);
             } else {
                 array[i] = ((WrapDynaBean)get(i)).getInstance(); 
             }



Mime
View raw message