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] Updated: (HARMONY-4602) [classlib][beans] Introspector.getBeanInfo(Class) will get wrong BeanInfo when there are same classes in different package.
Date Mon, 06 Aug 2007 10:09:59 GMT

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

Sean Qiu updated HARMONY-4602:
------------------------------

    Attachment: beanstest.zip

This is the test code

> [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
>         Attachments: beanstest.zip
>
>
> 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