// Transform the response
CompareResponseCodec compResCodec = (CompareResponseCodec)response;
compResCodec.setMessageId( messageId );
compResCodec.addControl( response.getCurrentControl() );
CompareResponse compareResponse = convert( compResCodec );
CompareFuture compareFuture = (CompareFuture)responseFuture;
if ( compareFuture == null )
{
LOG.error( "CompareFuture is null" );
throw new LdapException( "CompareFuture is null" );
}
// remove the listener from the listener map
if ( LOG.isDebugEnabled() )
{
if ( compareResponse.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS )
{
// Everything is fine, return the response
LOG.debug( "Compare successful : {}", compareResponse );
}
else