[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Empty DN ("") String Value?



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.