commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Crown (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (BEANUTILS-422) getPropertyType return null on second descendant class
Date Sun, 17 Feb 2013 16:35:12 GMT

     [ https://issues.apache.org/jira/browse/BEANUTILS-422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alex Crown updated BEANUTILS-422:
---------------------------------

    Attachment: test.zip

Example for reproduce the bug
                
> getPropertyType return null on second descendant class
> ------------------------------------------------------
>
>                 Key: BEANUTILS-422
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-422
>             Project: Commons BeanUtils
>          Issue Type: Bug
>          Components: Bean / Property Utils
>    Affects Versions: 1.8.3
>         Environment: Oracle JDK 1.7.0.10 and later.
>            Reporter: Alex Crown
>         Attachments: test.zip
>
>
> PropertyUtils.getPropertyType() for IndexedProperty works only for first invoked descendant
class. 
> Bug reproduced in JDK 1.7.0.10 - 13. In JDK 1.7.0.9 it works fine. As I see, in JDK 1.7.0.10
java.beans.Introspector was changed, but I don't understand how it works.
> *Example*
> *file* is IndexedProperty of the RootBean (attachend to issue) with type ArrayList<String>.
> RoootBean has two empty descendans: *FirstChildBean* and *SecondChildBean*.
> {code}
> RootBean bean = new FirstChildBean();
> Class propertyType = PropertyUtils.getPropertyType(bean, "file[0]");
> System.out.println(propertyType != null ? propertyType.getName() : null);
> -- Expected: java.lang.String, Actual: java.lang.String
> bean = new SecondChildBean();
> propertyType = PropertyUtils.getPropertyType(bean, "file[0]");
> System.out.println(propertyType != null ? propertyType.getName() : null);
> -- Expected: java.lang.String, Actual: null
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message