Last active
August 29, 2015 14:09
-
-
Save dtanner/3bd1dca4a0631959c390 to your computer and use it in GitHub Desktop.
Groovy spread operators on a null collection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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