Skip to content

Instantly share code, notes, and snippets.

@dtanner
Last active August 29, 2015 14:09
Show Gist options
  • Save dtanner/3bd1dca4a0631959c390 to your computer and use it in GitHub Desktop.
Save dtanner/3bd1dca4a0631959c390 to your computer and use it in GitHub Desktop.
Groovy spread operators on a null collection
def things = null
things.collect { it.a } // returns []
things*.a // returns null
things.a // throws a NullPointerException
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment