You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Kevin Zhou (JIRA)" <ji...@apache.org> on 2010/05/24 10:40:23 UTC

[jira] Updated: (HARMONY-6422) StandardBeanInfo behaves differently from RI GenericBeanInfo

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

Kevin Zhou updated HARMONY-6422:
--------------------------------

    Attachment: HARMONY-6422.diff

Would this patch fix this problem ? Correct me if there is something wrong, thanks!

> StandardBeanInfo behaves differently from RI GenericBeanInfo
> ------------------------------------------------------------
>
>                 Key: HARMONY-6422
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6422
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Sebb
>         Attachments: HARMONY-6422.diff
>
>
> StandardBeanInfo behaves differently from RI GenericBeanInfo:
> -----cut here-------
> import java.beans.BeanInfo;
> import java.beans.Introspector;
> public class BeanTest {
>     public static void main(String[] args) throws Exception {
>          BeanInfo beanInfo = Introspector.getBeanInfo(BeanTest.class);
>          System.out.println(beanInfo.getClass().getName()); // RI=GenericBeanInfo, Harmony=StandardBeanInfo
>          System.out.println(beanInfo.getBeanDescriptor().getDisplayName()); // BeanTest (both)
>          beanInfo.getBeanDescriptor().setDisplayName("test");
>          System.out.println(beanInfo.getBeanDescriptor().getDisplayName());// test (RI) BeanTest (Harmony)
>     }
> }
> -----cut here-------
> This is because the RI always returns the same instance from getBeanDescriptor() whereas Harmony returns a new instance.
> I don't know if this is a spec. violation or not, but the behaviour is different and unexpected, so should at least be documented in the BeanInfo Javadoc.

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