harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nellya Udovichenko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-4049) [classlib][beans] Compatibility: java.beans.Introspector calculates default event index for a bean in a different way
Date Thu, 21 Jun 2007 16:10:26 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-4049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506949
] 

Nellya Udovichenko commented on HARMONY-4049:
---------------------------------------------

I think we have the same RI problem with the events as with the properties earlier. You can
see the discussion in dev list 
http://mail-archives.apache.org/mod_mbox/harmony-dev/200611.mbox/%3c2c9597b90611170202o10795351nad7f12be6e6e847b@mail.gmail.com%3e
and JIRA HARMONY-2289.

When getDefaultEventIndex() method is invoked in Test Bean1BeanInfo.getDefaultEventIndex()
one is used at Harmony (private class java.beans.BeanInfoWrapper). Bean2BeanInfo class doesn't
exist so the super class bean info Bean1BeanInfo is found and its methods have been used.
But it looks as if RI invokes the method getDefaultEventIndex() from its internal class -
no Bean1BeanInfo.

Therefore, the returned value 0 is right and Harmony behavior is correct. And we have to rewrite
the functional test. Any ideas?


> [classlib][beans] Compatibility: java.beans.Introspector calculates default event index
for a bean in a different way
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4049
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4049
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Roman S. Bushmanov
>         Attachments: test.zip
>
>
> In the following case Introspector.getBeanInfo(Bean2.class).getDefaultEventIndex() return
different values on Harmony and RI.
> A Bean2 class extends Bean1 class and doesn't have corresponding BeanInfo class. Bean1
class has BeanInfo class which defines getDefaultEventIndex() and  getEventSetDescriptors().
 Bean1 class is supposed to file events of FredEvent type, i.e. it defines add/remove method
for corresponding event listeners. Bean2 in its turn is supposed to throw events of another
type, ColorEvent. 
> The attached test reproduces the described picture.
> Harmony output is
> beanInfo.getDefaultEventIndex(): 0
> at the same time RI prints
> beanInfo.getDefaultEventIndex(): 1
> In other words, Harmony simply returns the value ruturned by Bean1BeanInfo's getDefaultEventIndex()
method while RI takes in account the events supported by Bean2.
> Affected tests:
> functional/org/apache/harmony/test/func/api/java/beans/introspector/useallmethods/ConcatenateImmidiateAndSuperBeanInfosTest.xml
> (see HARMONY-3528)

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