Hi,
trying to fix the issue I faced last night (see the associated mail), I
found that the lookup operation does return null when we lookup for an
absent entry. When we go through the ExceptionInterceptor, then we
generate a LdapNoSuchObjectException, in all previous interceptor, we
simplly do things like :
Entry entry = nextInterceptor.lookup( lookupContext );
if ( entry == null ) { return null; }
I do think this is a hack, and it would be way better if the
DefaultPartitionNexus.lookup() method was handling the case this way :
public ClonedServerEntry lookup( LookupOperationContext
lookupContext ) throws LdapException
{
...
Partition backend = getPartition( dn );
Entry entry = backend.lookup( lookupContext );
if ( entry == null )
{
LdapNoSuchObjectException e = new
LdapNoSuchObjectException( "Attempt to lookup non-existant entry: "
+ dn.getName() );
throw e;
}
else
{
return ( ClonedServerEntry ) entry;
}
}
instead of what we currently have :
public ClonedServerEntry lookup( LookupOperationContext
lookupContext ) throws LdapException
{
...
Partition backend = getPartition( dn );
return backend.lookup( lookupContext );
}
wdyt ?
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com