Null Object Pattern

This past week I fixed an issue that has been nagging at me for some time. My project has a number of functions that take collections as parameters. Every time a function receives a collection as a parameter, it first checks to see if it is null, and if it is the function will exit right away or throw an exception. Now, this isn’t a huge problem, but it’s one of those irritants that causes bad code to grow.

Continue reading “Null Object Pattern”