commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Atallah (JIRA)" <>
Subject [jira] [Created] (BEANUTILS-465) Indexed List Setters no longer work
Date Thu, 11 Sep 2014 21:06:33 GMT
Daniel Atallah created BEANUTILS-465:

             Summary: Indexed List Setters no longer work
                 Key: BEANUTILS-465
             Project: Commons BeanUtils
          Issue Type: Bug
          Components: ConvertUtils & Converters
    Affects Versions: 1.9.2
            Reporter: Daniel Atallah

After upgrading to commons-beanutils 1.9.2 from 1.8.3, I ran into a bug where indexed List
setters no longer work.

Per the documentation at:
" As an extension to the JavaBeans specification, the BeanUtils package considers any property
whose underlying data type is java.util.List (or an implementation of List) to be indexed
as well."

This no longer appears to be an accurate statement.

The cause appears to be more strict validation in both org.apache.commons.beanutils.converters.StringConverter.convertToType()
and in org.apache.commons.beanutils.converters.AbstractConverter.
There is now an explicit cast to the target type, which throws an Exception instead of the
previous behavior of simply returning the input value unconverted.

I'll attach a test case that works with 1.8.3, but no longer works with 1.9.2.

This message was sent by Atlassian JIRA

View raw message