directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel L├ęcharny <elecha...@gmail.com>
Subject ParentIdAndRdn comparison method
Date Sun, 26 Feb 2012 15:25:13 GMT
Hi guys,

the ParentIdAndRdn class is using a compareTo() method which check the 
nrmalized string of Rdns. This is not good, as a Rdn may be composed of 
more than one Ava.

I have rewritten this method to be able to compare RDN like 
cn=Doe+gn=John with RDN like gn=John+cn=Doe. It works.

Now, I wonder if it would not be a better idea to still use a String 
comparison, but on a Rdn having an ordered set of Ava (ie, in the 
previous example, as cn=2.5.4.3 and gn=2.5.4.4, we will always have a 
normalized String RDN looking like "2.5.4.3=doe+2.5.4.4=john", allowing 
fast comparisons.

wdyt ?

-- 
Regards,
Cordialement,
Emmanuel L├ęcharny
www.iktek.com


Mime
View raw message