directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Norval Hope" <>
Subject Re: Current Rdn/LdapDN behaviour
Date Wed, 13 Dec 2006 03:33:56 GMT
On 12/13/06, Emmanuel Lecharny <> wrote:> Well,
LdapDN.toString() contract may be not really clear. It returns the
> normalized name, which is not what you expect, but which is what the
> server is using when doing DN comparizon, for speed sake. Let's say that
> 'toString' is not exactly the best name for this method, and we should
> use toNormName() instead (this metho exists, but calculate the
> normalized name).
> Ok,ok, you are right, this is messy... :(
> I suggest you open an issue, and make a proposal for methods renaming.
> At least, we won't forget to do that during the next release race.
> PS: LdapDN was not intended to be used in external tools, it was written
> with performance in mind, because DN parsing and manipulation cost
> around 50% of all the CPU when adding or searching data. However, this
> was not really a reason to deliver such a crappy API :(
> Emmanuel

Thanks for the feedback. My point is that toNormName() should also
return a valid parseable DN string (with quoted chars). This won't
effect speed in comparisons or the general principal of having a
normalized representation.

I'll open a JIRA with this thread included.

View raw message