On 12/13/06, Emmanuel Lecharny <[EMAIL PROTECTED]> 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.