// Transform the response
AddResponseCodec addRespCodec = (AddResponseCodec)response;
addRespCodec.addControl( response.getCurrentControl() );
addRespCodec.setMessageId( messageId );
AddResponse addResponse = convert( addRespCodec );
AddFuture addFuture = (AddFuture)responseFuture;
if ( addFuture == null )
{
LOG.error( "AddFuture is null" );
throw new LdapException( "AddFuture is null" );
}
// remove the listener from the listener map
if ( LOG.isDebugEnabled() )
{
if ( addResponse.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS )
{
// Everything is fine, return the response
LOG.debug( "Add successful : {}", addResponse );
}
else