harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Qiu (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-4602) [classlib][beans] Introspector.getBeanInfo(Class) will get wrong BeanInfo when there are same classes in different package.
Date Mon, 22 Dec 2008 05:08:44 GMT

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

Sean Qiu resolved HARMONY-4602.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0M9

Thank you for the patch.
Applied in r728612, please verify if it works as you expected.

> [classlib][beans] Introspector.getBeanInfo(Class) will get wrong BeanInfo when there
are same classes in different package.
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4602
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4602
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Sean Qiu
>            Assignee: Sean Qiu
>             Fix For: 5.0M9
>
>         Attachments: beanstest.zip, Harmony-4602.diff
>
>
> After set more than one path in Introspector.setBeanInfoSearchPath(String[]), 
> if there are some classes with the same class name but in different package,
> Introspector.getBeanInfo(Class) will get wrong BeanInfo.
> The getBeanInfo will return the  BeanInfo of the first found class regardless with its
package.
> ===== Test ======
> public class IntrospectorTest extends TestCase {
>     public void testsetBeanInfoSearchPath() throws IntrospectionException {
>         Introspector.setBeanInfoSearchPath(new String[] { 
>                 "mockbeans2.info",
>                 "mockbeans1.info", });
>         BeanInfo beanInfo = Introspector.getBeanInfo(MockSubject.class);
>         BeanDescriptor beanDesc = beanInfo.getBeanDescriptor();
>         assertEquals(beanDesc.getName(), "mockbeans1");
>         assertEquals(beanDesc.getBeanClass(), MockSubject.class);
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message