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

GroovyShell.evaluate

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0-beta-5
    • None
    • None

    Description

      p = [1,2,3]
      pp = '' + p
      obj = new GroovyShell().evaluate(pp)
      print obj

      – the above works

      p = [1,2,3]
      obj = new GroovyShell().evaluate("${p}")
      print obj

      – produces argument mismatch exception.

      The reason seems to be that the evaluate() takes a String, rather than GString. The Strange thing is that it somehow still prints the value, in spite of the exception.

      Attachments

        Issue Links

          Activity

            People

              guillaume Guillaume Sauthier
              bingran Bing Ran
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: