[
https://issues.apache.org/jira/browse/BEANUTILS-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12892681#action_12892681
]
Charlie Mordant commented on BEANUTILS-346:
-------------------------------------------
Same for BeanUtils.copyProperties(), throws a NullPointerException for Enum
> Enum type is not supported
> --------------------------
>
> Key: BEANUTILS-346
> URL: https://issues.apache.org/jira/browse/BEANUTILS-346
> Project: Commons BeanUtils
> Issue Type: Bug
> Components: Bean / Property Utils
> Affects Versions: 1.8.0-BETA
> Environment: JDK6
> Reporter: Miroslav Nachev
> Fix For: LATER THAN 1.8.4
>
>
> When I try to set some property of type Enum the exception is thrown. This
> can be fixed with the following code:
> private static class EnumConvertUtils extends ConvertUtilsBean {
> public EnumConvertUtils() {
> }
> @Override
> public Object convert(String value, Class clazz) {
> if(clazz.isEnum())
> return Enum.valueOf(clazz, value);
> return super.convert(value, clazz);
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.