Uploaded image for project: 'Beehive'
  1. Beehive
  2. BEEHIVE-1152

EventSets with same name in control hierarchy cause complilation error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.1
    • V.Next
    • Controls
    • None

    Description

      A compilation error is generated when you have the following:

      @ControlInterface
      public interface SuperControl {

      @EventSet()
      public interface CtrlCallback

      { void onSuperEvent(); }

      }

      @ControlInterface
      public interface SubControl extends SuperControl {
      @EventSet()
      public interface CtrlCallback

      { void onSubEvent(); }

      }

      The compilation error is:

      [apt] D:\beehive\trunk\controls\test\build\junit-controls-beansrc\org\apache\beehive\controls\test\controls\eventsetInheritance2\SubControlBean.java:239: getCtrlCallbackListeners() in org.apache.beehive.controls.test.controls.eventsetInheritance2.SubControlBean cannot override getCtrlCallbackListeners() in org.apache.beehive.controls.test.controls.eventsetInheritance2.SuperControlBean; attempting to use incompatible return type
      [apt] found : org.apache.beehive.controls.test.controls.eventsetInheritance2.SubControl.CtrlCallback[]
      [apt] required: org.apache.beehive.controls.test.controls.eventsetInheritance2.SuperControl.CtrlCallback[]
      [apt] public synchronized org.apache.beehive.controls.test.controls.eventsetInheritance2.SubControl.CtrlCallback [] getCtrlCallbackListeners()
      [apt] ^
      [apt] Note: Some input files use unchecked or unsafe operations.
      [apt] Note: Recompile with -Xlint:unchecked for details.
      [apt] 1 error

      I'll attach a zip containing the full source of the controls.

      Attachments

        1. BEEHIVE-1152-SAMPLE.zip
          5 kB
          Chad Schoettger

        Activity

          People

            chad_s Chad Schoettger
            chad_s Chad Schoettger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: