commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (BEANUTILS-88) PropertyUtilsBean.isReadable/isWriteable always returns false for mapped properties
Date Thu, 24 May 2007 15:39:18 GMT

     [ 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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message