commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject svn commit: r440653 - /jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtilsBean.java
Date Wed, 06 Sep 2006 08:24:40 GMT
Author: imario
Date: Wed Sep  6 01:24:40 2006
New Revision: 440653

URL: http://svn.apache.org/viewvc?view=rev&rev=440653
Log:
in case of indexed property also pass a null value to the converter (as
with the other destinations)
This is required to make it work with primitive type arrays like
boolean[] where you cant set a null value directly


Modified:
    jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtilsBean.java

Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtilsBean.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtilsBean.java?view=diff&rev=440653&r1=440652&r2=440653
==============================================================================
--- jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtilsBean.java
(original)
+++ jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtilsBean.java
Wed Sep  6 01:24:40 2006
@@ -1021,7 +1021,7 @@
                 newValue = value;
             }
         } else if (type.isArray()) {         // Indexed value into array
-            if (value instanceof String) {
+            if (value instanceof String || value == null) {
                 newValue = getConvertUtils().convert((String) value,
                                                 type.getComponentType());
             } else if (value instanceof String[]) {



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message