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

ModuleNode should setScriptBaseClassFromConfig from context or unit

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.7, 2.1.1
    • Component/s: Compiler
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: