You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Sean Qiu (JIRA)" <ji...@apache.org> on 2008/06/04 09:08:45 UTC

[jira] Assigned: (HARMONY-4602) [classlib][beans] Introspector.getBeanInfo(Class) will get wrong BeanInfo when there are same classes in different package.

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

Sean Qiu reassigned HARMONY-4602:
---------------------------------

    Assignee: Sean Qiu  (was: Leo Li)

> [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
>         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.