Hi!
I've found a little bug in beanutils where, in case of indexed primitive
types (e.g. boolean array) a null value gets not correctly converterd.
If nobody minds I'll commit the following patch for beanuilts:
Index: src/java/org/apache/commons/beanutils/BeanUtilsBean.java
===================================================================
--- src/java/org/apache/commons/beanutils/BeanUtilsBean.java
(Revision 440283)
+++ src/java/org/apache/commons/beanutils/BeanUtilsBean.java
(Arbeitskopie)
@@ -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[]) {
Test cases still pass, and now our application will work too.
Thanks!
Ciao,
Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]