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

GroovyScriptEngine doesn't inherit CompilerConfiguration from parent classloader

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.6-beta-2
    • 1.6-rc-2, 1.5.8, 1.7-beta-1
    • groovy-jdk
    • None
    • Patch

    Description

      GroovyScriptEngine doesn't inherit CompilerConfiguration from parent classloader

      CompilerConfiguration cc = new CompilerConfiguration();
      cc.setScriptBaseClass(ScriptBase.class.getName())

      GroovyClassLoader cl= new GroovyClassLoader(this.getClassLoader(), cc, false)

      GroovyScriptEngine engine = new GroovyScriptEngine("file://.", cl)
      def script = engine.createScript("test.groovy", new Binding())

      assertTrue(script instanceof ScriptBase.)

      Attachments

        1. GroovyScriptEngine.patch
          5 kB
          Alexey Utkin
        2. GroovyScriptEngine.patch.2
          5 kB
          Alexey Utkin

        Activity

          People

            guillaume Guillaume Sauthier
            alx-ut Alexey Utkin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: