[
https://issues.apache.org/jira/browse/GROOVY-3880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul King closed GROOVY-3880.
-----------------------------
> Optional Assignment Operator
> ----------------------------
>
> Key: GROOVY-3880
> URL: https://issues.apache.org/jira/browse/GROOVY-3880
> Project: Groovy
> Issue Type: Improvement
> Components: syntax
> Reporter: Michael Martz
> Assignee: Daniel Sun
> Fix For: 3.0
>
>
> I find myself writing a lot of code in the following form:
> if(data.field) obj.field = data.field
> // Or
> obj.field = data.field?: obj.field
> It would be nice to have a groovy operator to handle this for me.
> obj.field ?= data.field
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)