You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2025/01/07 14:07:01 UTC
[jira] [Updated] (BEANUTILS-181) [beanutils] Default converter for LocaleConvertUtilsBean
[ https://issues.apache.org/jira/browse/BEANUTILS-181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary D. Gregory updated BEANUTILS-181:
--------------------------------------
Fix Version/s: 2.0.0-M2
(was: 2.0.0-M1)
> [beanutils] Default converter for LocaleConvertUtilsBean
> --------------------------------------------------------
>
> Key: BEANUTILS-181
> URL: https://issues.apache.org/jira/browse/BEANUTILS-181
> Project: Commons BeanUtils
> Issue Type: Improvement
> Components: Locale BeanUtils / Converters
> Affects Versions: 1.6.1
> Environment: Operating System: other
> Platform: Other
> Reporter: Tulbiak
> Priority: Minor
> Fix For: 2.0.0-M2
>
> Attachments: ASF.LICENSE.NOT.GRANTED--BeanUtilsBean.java, ASF.LICENSE.NOT.GRANTED--LocaleBeanUtilsBean.java, ASF.LICENSE.NOT.GRANTED--LocaleConvertUtilsBean.java
>
>
> When using the LocaleBeanUtils instead of BeanUtils, i got this exception (my
> form has a radio button and a checkbox):
> org.apache.commons.beanutils.ConversionException: Cannot assign value of type
> 'java.lang.String' to property 'fixedEndDate' of type 'java.lang.Boolean'
> at org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:423)
> at org.apache.commons.beanutils.PropertyUtilsBean.
> setSimpleProperty(PropertyUtilsBean.java:1733)
> at org.apache.commons.beanutils.PropertyUtilsBean.
> setNestedProperty(PropertyUtilsBean.java:1648)
> at org.apache.commons.beanutils.PropertyUtilsBean.
> setProperty(PropertyUtilsBean.java:1677)
> at org.apache.commons.beanutils.locale.LocaleBeanUtilsBean.
> invokeSetter(LocaleBeanUtilsBean.java:826)
> at org.apache.commons.beanutils.locale.LocaleBeanUtilsBean.
> setProperty(LocaleBeanUtilsBean.java:631)
> at org.apache.commons.beanutils.locale.LocaleBeanUtilsBean.
> setProperty(LocaleBeanUtilsBean.java:565)
> at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.
> java:811)
> After some investigations, it seems there is no registration in
> LocaleConvertUtilsBean for Boolean (and may be others) and i can't manualy
> register the BooleanConverter (not a LocaleConverter).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)