groovy-core icon indicating copy to clipboard operation
groovy-core copied to clipboard

make null.iterator() throw a NPE

Open blackdrag opened this issue 11 years ago • 0 comments

This is a pullrequest to show case the changes required to groovy-core if null.iterator() is supposed to throw a NPE. This is not thought as contribution for Groovy 2.4, more as a base of discussion. While this pull request goes by changing the places where the possibly null valued collections are used, a possible other solution is to change all groovy-core Object methods, that use iterator to know about null.

blackdrag avatar Dec 12 '14 14:12 blackdrag