directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: DN compareTo()
Date Wed, 08 Jul 2015 10:35:16 GMT
Le 08/07/15 11:54, Kiran Ayyagari a écrit :
> On Wed, Jul 8, 2015 at 5:36 PM, Emmanuel Lécharny <elecharny@gmail.com>
> wrote:
>
>         if ( dn.isDescendantOf( that.dn ) )
>         {
>             return 1;
>         }
>         else if ( that.dn.isDescendantOf( dn ) )
>         {
>             return -1;
>         }
>
> can we change the return types here to -1 and 1, so that the DNs are
> ordered in perfect hierarchy
> this is useful for exporting/importing LDIF

If the this.dn is a descendant of that.dn, then the method should return
1 (which means this.dn > that.dn), no ?

Mime
View raw message