groovy
  1. groovy
  2. GROOVY-287

$!{text} toString()'s to "" instead of null

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      For GroovyTemplates its not very desirable to have alot of "null" printed everywhere we might have included a possible null value. So it would be nice to have a way to make GString print "" instead of null.

      Velocity does that via $!

      {text}

      which I think is ok, but we may just parse the Template text and always "insert" $

      {(text == null) ? "" : text"}

      since I think its always the desired behaviour for gstrings to not print null (within Templates).

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Paul King
              Reporter:
              Thomas Heller
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: