[ http://issues.apache.org/jira/browse/BEANUTILS-88?page=all ]
Henri Yandell updated BEANUTILS-88:
-----------------------------------
Bugzilla Id: (was: 36980)
Fix Version/s: 1.8.0
> [beanutils] PropertyUtilsBean.isReadable/isWriteable always returns false for
> mapped properties
> -----------------------------------------------------------------------------------------------
>
> Key: BEANUTILS-88
> URL: http://issues.apache.org/jira/browse/BEANUTILS-88
> Project: Commons BeanUtils
> Issue Type: Bug
> Components: Bean / Property Utils
> Environment: Operating System: All
> Platform: All
> Reporter: Chuck Daniels
> Fix For: 1.8.0
>
>
> PropertyUtilsBean.isReadable/isWriteable always returns false for mapped
> properties because it does not account for them. The core logic within the
> try
> block of the isReadable method should look as follows (the logic for
> isWriteable should be updated similarly):
> PropertyDescriptor desc =
> getPropertyDescriptor(bean, name);
> if (desc != null) {
> Method readMethod = desc.getReadMethod();
> if (readMethod == null) {
> if (desc instanceof IndexedPropertyDescriptor) {
> readMethod = ((IndexedPropertyDescriptor)
> desc).getIndexedReadMethod
> ();
> } else if (desc instanceof MappedPropertyDescriptor) {
> readMethod = ((MappedPropertyDescriptor) desc).getMappedReadMethod
> ();
> }
> }
> return (readMethod != null);
> } else {
> return (false);
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]