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

GroovyShell fails to give script constructor or setBinding a binding for "args"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.6, 2.4.0-beta-2
    • 2.4.0-beta-4
    • None
    • None
    • Patch

    Description

      GroovyShell calls scripts in a few different places but in each case fails to have the binding for "args" set when calling the constructor or setBinding. The result is that initialization code in the constructor cannot function correctly and that fallback relying on overriding setBinding fail too.

      The Groovy compiler generates two constructors for every script. A default one and one taking a Binding. The reason for that is so that constructors can get the binding values they need.

      Attachments

        Activity

          People

            jimwhite James P. White
            jimwhite James P. White
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: