Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
1.9.2, 1.9.3
-
commons-beanutils-1.9.3-20160606.150953-11
jdk1.8.0_92
Description
An exception is thrown when adding indexed properties to a DynaBean. This worked perfectly with Version 1.8.3
org.apache.commons.beanutils.ConversionException: Default conversion to ArrayList failed.
at org.apache.commons.beanutils.converters.AbstractConverter.handleMissing(AbstractConverter.java:314)
at org.apache.commons.beanutils.converters.AbstractConverter.handleError(AbstractConverter.java:269)
at org.apache.commons.beanutils.converters.AbstractConverter.convert(AbstractConverter.java:177)
at org.apache.commons.beanutils.converters.ConverterFacade.convert(ConverterFacade.java:61)
at org.apache.commons.beanutils.ConvertUtilsBean.convert(ConvertUtilsBean.java:491)
at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1004)
at BeanUtilsBeanTestApp.main(BeanUtilsBeanTestApp.java:11)
Caused by: org.apache.commons.beanutils.ConversionException: Can't convert value '' to type class java.util.ArrayList
at org.apache.commons.beanutils.converters.AbstractConverter.conversionException(AbstractConverter.java:474)
at org.apache.commons.beanutils.converters.StringConverter.convertToType(StringConverter.java:96)
at org.apache.commons.beanutils.converters.AbstractConverter.handleMissing(AbstractConverter.java:312)
... 6 more
Test Class:
import org.apache.commons.beanutils.BeanUtilsBean;
import org.apache.commons.beanutils.LazyDynaBean;
public class BeanUtilsBeanTestApp {
public static void main(String[] args) {
try
catch (Exception e)
{ e.printStackTrace(); } }
}