Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Templating
-
Labels:None
-
Number of attachments :
Description
println "hello $user whats it like in $user.country.description today?"
could make things a little simpler. Only should work for $identifer separated by whitespace. Otherwise ${} is required.
Similarly its very common that if an expression is null, then folks don't want to output 'null'.
So how about
println "hey $!
{user}"
which would not print
hey null
if the user is null, rather it'd print
hey
Issue Links
- is duplicated by
-
GROOVY-287
$!{text} toString()'s to "" instead of null
-
GROOVY-287duplicate.Yuri had a nice idea here.