directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <>
Subject Re: Empty DN ("") String Value?
Date Mon, 26 Nov 2007 12:10:30 GMT
Michael Ströder wrote:
> ... So "" would reference something existing or well-defined. 
It's not really the case. The RootDSE is represented by an empty String 
("") as specified by RFC 4512, (chap. 5.1), but it does not mean that "" 
as a DN represents _only_ the rootDSE, or has any specific meaning, out 
of a specific context. There are many other case where you may want to 
use this value.

For instance, when you want to manipulate DNs, adding or removing RDNs, 
an empty DN ("") makes a lot of sense. A null DN is just a null object, 
so you can't write nullDn.toString() (=> a direct NPE will be raised ;) 
and returning null when calling toString() makes no sense, as an empty 
DN is perfectly valid.

At this point, it's just a personal convenience, if you prefer to test 
for a null DN or for an empty String, do like you want :).

> Ciao, Michael.

cordialement, regards,
Emmanuel Lécharny

View raw message