commons-issues 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-305) PropertyUtilsBean.isWritable() returns false when the property is mapped and there is a mapped write method available
Date Tue, 12 Feb 2008 16:59:08 GMT

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

Niall Pemberton resolved BEANUTILS-305.
---------------------------------------

       Resolution: Duplicate
    Fix Version/s: 1.8.0-BETA

> PropertyUtilsBean.isWritable() returns false when the property is mapped and there is
a mapped write method available 
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: BEANUTILS-305
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-305
>             Project: Commons BeanUtils
>          Issue Type: Bug
>          Components: Bean / Property Utils
>    Affects Versions: 1.7.0
>         Environment: jdk 1.4.2
>            Reporter: Stuart Brown
>             Fix For: 1.8.0-BETA
>
>
> PropertyUtilsBean.isWritable returns false when there is a mapped property write method.
It does not do this on indexed properties, I am not sure why mapped properties would be handled
differently, but I do not believe they should be. Also this means there is no method in the
class to test for writable mapped properties.
> Also PropertyUtilsBean.isReadable has the same issue and the fix is similar.
> Following code should work : 
> 1185                    Method writeMethod = desc.getWriteMethod();
> 1186                    if ((writeMethod == null) &&
> 1187                        (desc instanceof IndexedPropertyDescriptor)) {
> 1188                        writeMethod = ((IndexedPropertyDescriptor) desc).getIndexedWriteMethod();
> 1189                    }
> +                           if (( writeMethod==null) &&
> +                              (desc instanceof MappedPropertyDescriptor)) {
> +                              writeMethod = ((MappedPropertyDescriptor)desc).getMappedWriteMethod();
> +                            }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message