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

context variable breaks output transformation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.1
    • 2.1.3, 2.2.0-beta-1
    • Groovy Console
    • None

    Description

      Executing the script:

      context="test"

      in GroovyConsole breaks various functionality like output transformations and "Inspect Variables".

      The GroovyConsole accesses the binding (context) of the internal shell via shell.context, thus leading to a call to shell.getProperty(). GroovyShell's getProperty() method however first tries to resolve against its variables. So if a variable with the name "context" is set, GroovyConsole uses its value, instead of the binding.

      Replacing each occurence of shell.context with shell.getContext() should resolve the problem.

      Attachments

        Activity

          People

            paulk Paul King
            mkresse Martin Kresse
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: