[ 
http://issues.apache.org/jira/browse/BEEHIVE-996?page=comments#action_12376289 
] 

matt c commented on BEEHIVE-996:
--------------------------------

**This bug may be closed.

Verified fixed using local beehive build synced to SVN 393036 by reproducing, 
verifying compilation, and examining bean code.

Verified that this bug has been fixed.  Looks like the generated bean code is 
quite a bit different now, with a 'Notifier' class being created.  Here is what 
I am seeing in the extended control bean for the callback: (SubHello extends 
Hello, and both contain MyCallback, with the one in SubHello extending the 
callback in Hello)

    protected class MyCallbackNotifier extends HelloBean.MyCallbackNotifier
        implements SubHello.MyCallback, Serializable
    {

        public void anotherCallbackMethod()
        {
            Throwable __bc_thrown = null;
            MyCallbackNotifier __bc_notifier = 
(MyCallbackNotifier)getEventNotifier(org/apache/beehive/controls/test/controls/myTests/SubHello$MyCallback);
            Object __bc_argArray[] = new Object[0];
            Iterator __bc_listenerIter = __bc_notifier.listenerIterator();
            try
            {
                while(__bc_listenerIter.hasNext()) 
                {
                    SubHello.MyCallback __bc_listener = 
(SubHello.MyCallback)__bc_listenerIter.next();
                    __bc_listener.anotherCallbackMethod();
                }
            }
            catch(Throwable __bc_t)
            {
                __bc_thrown = __bc_t;
                if(__bc_t instanceof Error)
                    throw (Error)__bc_t;
                if(__bc_t instanceof RuntimeException)
                    throw (RuntimeException)__bc_t;
                else
                    throw new UndeclaredThrowableException(__bc_t);
            }
        }

        private static final long serialVersionUID = 1L;
        final SubHelloBean this$0;

        protected MyCallbackNotifier()
        {
            this$0 = SubHelloBean.this;
            super(SubHelloBean.this);
        }
    }

There are no compilation errors.

**This bug may be closed.

> Compilation error on an extended control bean when callback intf on base ctrl 
> intf and extended crtl intf have same name
> ------------------------------------------------------------------------------------------------------------------------
>
>          Key: BEEHIVE-996
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-996
>      Project: Beehive
>         Type: Bug

>   Components: Controls
>     Versions: V1
>  Environment: Win XP
>     Reporter: Pradeep Bollineni
>     Assignee: Jacob Danner

>
> The control bean generated for the control extension has ambiguous reference 
> to Callback interface in the callback listener methods when there is a 
> callback interface extension in the control extension as shown below:
> @ControlInterface
> interface BaseControl {
>     @EventSet
>     public interface Callback {
>         void method1();
>     }
> }
> @ControlExtension
> interface ExtendedControl extends BaseControl {
>     @EventSet 
>     public interface Callback extends BaseControl.Callback {
>          void method2();
>     }
> }
> Generated ControlBean listener method:
> public class ExtendedControlBean extends BaseControlBean implements 
> ExtendedControl {
>     public synchronized void removeCallbackListener(Callback listener)
>     {
>         CallbackNotifier notifier = 
> (CallbackNotifier)getEventNotifier(Callback.class); //ambiguous reference as 
> there is a Callback in BaseControlBean and ExtendedControl
>         notifier.removeListener(listener);
>     }
> }
> Is there a work around for this other than re-naming the interface in the 
> extended control?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to