Hello,
 
I humbly submit a patch for BeanUtils.java, correcting the following errors:
 
1. When you try to populate a read-only property, the populate method throws a NoSuchMethodException (wrapped in an InvocationTargetException), since there is no check that the property has a setter method.
 
2. When you try to populate a primitive property with a null value, you get a NullPointerException, since no data type conversion is applied to null values.
 
I have also patched BeanUtilsTestCase.java to include setting a primitive property to null and attempting to set a read-only (simple) property.
 
Regards,
Tomas Viberg, [EMAIL PROTECTED]

Attachment: BeanUtils.java.patch
Description: Binary data

Attachment: BeanUtilsTestCase.java.patch
Description: Binary data

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


Reply via email to