Diasparsoft Logo Let's write software that people understand.

Home | Contact

Training

JUnit support

Outsourcing

The work that Diasparsoft did for us was outstanding. We are now using the software on a daily basis and their work could well have a dramatic impact on the Reds' organization in the near future.Cincinnati Reds Baseball Club.


Publications

Tips & Tricks

Diasparsoft Toolkit

What is Diaspar?

Interesting Bits RSS

Home » Archives » April 2005 » Null as a method parameter

[Previous entry: "Cryptic documentation: RubyScript2Exe"] [Next entry: "How to know you're a consultant"]

04/29/2005: "Null as a method parameter"


Unless I'm publishing an API for general use, I don't worry about testing method parameters against null. It's too much code and too many duplicate tests. Besides, I would be testing the wrong thing.

When a method receives null as a parameter, the invoker -- and not the receiver -- is missing a test.