Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.7.0
-
None
-
Operating System: All
Platform: All
-
36980
Description
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)
else if (desc instanceof MappedPropertyDescriptor)
{ readMethod = ((MappedPropertyDescriptor) desc).getMappedReadMethod (); } }
return (readMethod != null);
} else {
return (false);
}
Attachments
Issue Links
- is duplicated by
-
BEANUTILS-305 PropertyUtilsBean.isWritable() returns false when the property is mapped and there is a mapped write method available
- Closed