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

GroovyScriptEngine does not reload static imports on change

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.1.9
    • None
    • GroovyScriptEngine
    • None
    • Windows

    Description

      if a script loads a class from mypackage using static import and the class is changed, the next run will not recompile the dependent class.
      Script:

      import static mypackage.Test.*;

      doit()

      Class:
      package mypackage;

      class Test {
      static def doit()

      { println("Hello") }

      }

      Reproducer: run script in GroovyScriptEngine, then update the println in class Test to "Hello2", run script again, still Hello is printed.

      It works with normal imports.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mvmsoft Marco van Meegen
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: