[ http://issues.apache.org/jira/browse/BEEHIVE-118?page=all ] Kyle Marvin resolved BEEHIVE-118: ---------------------------------
Resolution: Fixed Added some additional semantic validation. In particular, the following cases are now caught and rejected: - Attempting to define properties (@PropertySet or @ExternalPropertySets) from within a ControlExten sion interface. Extensions are consumers, not declarers, of property annotation syntax. - Extending a ControlExtension with a ControlInterface. The following are the only valid inheritance/extension models: + ControlInterface (extends nothing) + ControlInterface extends ControlInterface + ControlExtension extends ControlInterface + ControlExtension extends ControlExtension Note, it is not possible to do any semantic validation that assumes a particular interface/extension binding to a specific implementation. This is by design to ensure that it remains possible to vary interface and implementation bindings (no implementation assumptions have been "baked" into the interface or derived codegen). Errors related to binding issues (for example, using an @ControlExtension with an implementation that does not implement Extensible) can only be caught at runtime or by a tool that validates control bindings (does not currently exist) > Improved semantic validation of @ControlExtension > ------------------------------------------------- > > Key: BEEHIVE-118 > URL: http://issues.apache.org/jira/browse/BEEHIVE-118 > Project: Beehive > Type: Bug > Components: Controls > Versions: V1Beta > Reporter: James Song > Assignee: Kyle Marvin > Priority: Minor > Fix For: V1 > > This originates from CR178618. > Problem: when SubControl.java is declared like in the sample: > @ControlExtension > public interface SubControl extends ExtensibleControl > { > ... > } > A runtime error occurs. > The real issue here is that SubControl.java is a Control public interface > (that extends another Control Interface), but has the @ControlExtension > annotation, when it really should have the @ControlInterface annotation. > The basic rule of thumb is that a JCX file has @ControlExtension, and > generally has no associated Impl (methods are handled by Extensible.invoke) > on the associated Impl; more direct impl subclassing (with associated > interface extension) is done using the @ControlInterface. > The checker should have detected this. -- 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