The assignment of a null value to a property of type String results in a NPE since the setProp method tests .length on the string. The set method should check whether the argument is a null value and then either replace with an empty string or skip the test. I think empty string is preferable.

Submitted by Eelco Visser on 30 August 2010 at 16:44

Log in to post comments