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

Version checking codegen cleanup

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • V1Alpha
    • v1m1
    • Controls
    • None

    Description

      The code generated static initialization code that does version checking for ControlBeans could be made better in a couple of ways:

      • the code generated by the enforceVersionRequired macro should be selectively generated. There is no reason to generate class load time version checking if there is no @VersionRequired annotation on the associated ControlExtension.
      • the ControlInterface to version check against can be (and should) be determined at codegen time and not runtime. The call to ControlBean.getMostDerivedInterface can be replaced by directly injecting the (versioned) ControlInterface class name. This is a) simpler, and b) safer, because having the class you are version checking against be dynamic doesn't really make sense.

      Attachments

        Activity

          People

            kylem Kyle Marvin
            kylem Kyle Marvin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: