Groovy
  1. Groovy
  2. GROOVY-2505

Need to be able to either convert a String to a GString or to evaluate a String.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.5.1
    • Fix Version/s: None
    • Component/s: groovy-jdk
    • Labels:
      None

      Description

      Several times it has been asked on the mailing list on how to either convert a String to a GString or to evaluate a String as a GString. The need arises when a String comes in from an external source and contains a GString expression, for example an XML file or a Configuration file. Currently one needs to either invoke the GroovyShell or the SimpleTemplateEngine to accomplish the task. In both cases this takes several lines of code and is not intuitively obvious.

      One could ether add a GDK method to String such as "evaluate" (which in my humble opinion would be the nicest) or provide a conversion of the form "String as GString"

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Erik Husby
          • Votes:
            13 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development