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


Reply via email to