Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.10
-
None
-
None
Description
The issue is BeanUtils.setProperty() can support the java Map bean to set the (key, value) entry. But the BeahHelper.initProperty() add 1 more PropertyUtils.isWriteable() check. While this PropertyUtils.isWriteable() doesn't support java Map bean.
The check "PropertyUtils.isWriteable()" is quite redundant and unnecessary.
Is it better to remove the check "PropertyUtils.isWriteable()" since the BeanUtils.setProperty() has various ways to set the properties?
BeanHelper.createBean() -> DefaultBeanFactory.createBean() -> DefaultBeanFactory.initBeanInstance() -> BeanHelper.initBean() ->BeahHelper.initProperty() { if (!PropertyUtils.isWriteable(bean, propName)) ... BeanUtils.setProperty(bean, propName, value); }