directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Ströder <mich...@stroeder.com>
Subject Re: Empty DN ("") String Value?
Date Mon, 26 Nov 2007 11:43:14 GMT
Marc Boorshtein wrote:
> I wanted to get an opinion from the other java ldap projects.  Should
> the toString() method of a class that represents a DN return null or
> an empty string?  I would think an empty string but JLDAP returns
> null.  Anyone have an opinion on the matter?

I'm not a Java programmer but in Python one has also to distinguish such
cases ("" vs. None).

It really depends on what you want to express. Note that "" represents
the rootDSE or root naming context. So "" would reference something
existing or well-defined. IMHO NULL (or None in Python) would better
signal something undefined or none-existing.

Ciao, Michael.

Mime
View raw message