[ https://issues.apache.org/jira/browse/GROOVY-3880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King updated GROOVY-3880: ------------------------------ Fix Version/s: (was: 3.0.0-alpha-1) > 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 > > 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)