Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-6002

ModuleNode should setScriptBaseClassFromConfig from context or unit

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.7, 2.1.1
    • Compiler
    • None

    Description

      Suggestion to replace the body of ModuleNode.setScriptBaseClassFromConfig with this:

              String baseClassName = null;
              if (unit != null) {
                  baseClassName = unit.getConfig().getScriptBaseClass();
              } else if (context != null) {
                  baseClassName = context.getConfiguration().getScriptBaseClass();
              }
              if(baseClassName != null) {
                  if(!cn.getSuperClass().getName().equals(baseClassName)) {
                      cn.setSuperClass(ClassHelper.make(baseClassName));
                  }
              }
      

      Reason: groovy-eclipse sometimes does not have the unit set when this method gets called, but the context is available.

      Attachments

        Activity

          People

            melix Cédric Champeau
            werdna Andrew Eisenberg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: