harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6422) StandardBeanInfo behaves differently from RI GenericBeanInfo
Date Tue, 19 Jan 2010 12:08:54 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-6422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12802217#action_12802217
] 

Sebb commented on HARMONY-6422:
-------------------------------

Good point.

I've got round the problem in JMeter by caching the return value, which should be slighlty
more efficient anyway.

Note that the behaviour is the same in IBM Java. Here are the details from the JMeter user
who got an NPE (caused by the loss of info):

$: java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build pap6460sr4-20090219_01(SR4))
IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64
jvmap6460-20090215_29883 (JIT enabled, AOT enabled)
J9VM - 20090215_029883_BHdSMr
JIT  - r9_20090213_2028
GC   - 20090213_AA)
JCL  - 20090218_01



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


Mime
View raw message