directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Re: [ApacheDS] Question about using LdapDN in DirectoryPartitionNexusProxy
Date Sun, 04 Jun 2006 00:25:30 GMT
Alex Karasulu a écrit :

>Emmanuel,
>
>I don't think this code here will normalize the LdapDN.  The getNameByOid map returned
from the OID registry is not a map of OIDs to Normalizers.  It is a map of OIDs to names and
vice versa.  So this will cause problems.  
>
>You remember when this code was added?  
>
>    public Attributes lookup( Name name, Collection bypass ) throws NamingException
>    {
>        ensureStarted();
>        InvocationStack stack = InvocationStack.getInstance();
>        stack.push( new Invocation( this, caller, "lookup", new Object[]
>            { name }, bypass ) );
>        try
>        {
>            OidRegistry registry = ( OidRegistry ) this.service.getConfiguration().getGlobalRegistries()
>                .getOidRegistry();
>
>            LdapDN.normalize( name, registry.getNameByOid() );
>
>            return this.configuration.getInterceptorChain().lookup( name );
>        }
>        finally
>        {
>            stack.pop();
>        }
>    }
>
>Alex
>
>
>  
>
This is bad code. As I told you, OidRegistry is not well initialized. We 
have to fix it. As sson has we have a correct HashMpa where we have the 
following mapping :

<OID> | <name> | <alias> -> normalizer, for each OID, name, or alias,

it should be ok.


Mime
View raw message