Apply consistent representation of having 'no value' for a particular database entry


In a system that has been used for a while, different representations for having 'nothing' exist in the jiveUser database. For the 'name' column, both empty strings as null values are used. The 'email' column has three representations: empty strings, null values, are strings that contain a single whitespace character.

The problem appears to be caused by the code that updates these values, based on a received IQ stanza (the Registration stanza): if no value can be parsed for a particular field, an empty string (or a string containing a space character) is used instead.

As the default value for those columns is 'null', this should be used to represent 'no value' even after the field was updated (a user removing a previously registered email address, for example).




Guus der Kinderen


Guus der Kinderen