groovy-core
groovy-core copied to clipboard
make null.iterator() throw a NPE
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.