[ 
https://issues.apache.org/jira/browse/BEANUTILS-422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13591713#comment-13591713
 ] 

Benedikt Ritter commented on BEANUTILS-422:
-------------------------------------------

I have created a Test Case from Test.java and committed it as Jira422TestCase 
in r1452029. This test does not fail in my environment which is:

{code}
D:\Entwicklung\workspaces\commons\beanutils>mvn -version
Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
Maven home: D:\Entwicklung\maven\3.0.3
Java version: 1.7.0_13, vendor: Oracle Corporation
Java home: D:\Entwicklung\Java\jdk1.7.0_13-x64\jre
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
{code}

Can you verify that this test fails in your environment? Please also attach the 
output of mvn -version.
If this bug is only related to a specific JVM version I'd like to have some 
sort of logic that first tests what JVM BeanUtils is running on and only 
executes the cache cleanup if the JVM is affected by this 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
>            Assignee: Benedikt Ritter
>             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

Reply via email to