commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedikt Ritter (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (BEANUTILS-422) getPropertyType return null on second descendant class
Date Thu, 28 Feb 2013 12:15:13 GMT

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

Benedikt Ritter updated BEANUTILS-422:
--------------------------------------

    Fix Version/s: 1.8.4
    
> 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
>            Assignee: Oliver Heger
>             Fix For: 1.8.4
>
>         Attachments: PropertyUtilsBean.java.patch, Test.java
>
>
> 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