[ 
https://issues.apache.org/jira/browse/BEANUTILS-88?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Niall Pemberton resolved BEANUTILS-88.
--------------------------------------

    Resolution: Fixed

> PropertyUtilsBean.isReadable/isWriteable always returns false for mapped 
> properties
> -----------------------------------------------------------------------------------
>
>                 Key: BEANUTILS-88
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-88
>             Project: Commons BeanUtils
>          Issue Type: Bug
>          Components: Bean / Property Utils
>    Affects Versions: 1.7.0
>         Environment: Operating System: All
> Platform: All
>            Reporter: Chuck Daniels
>         Assigned To: Niall Pemberton
>             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.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to