Skip to content
Permalink
Browse files
Patch for DIRAPI-364
  • Loading branch information
emmanuel lecharny committed Nov 17, 2020
1 parent ef1e2af commit 8d16cfef572b6b223fd417405475f9021a5a49eb
Showing 1 changed file with 14 additions and 1 deletion.
@@ -24,6 +24,7 @@
import org.apache.directory.api.ldap.model.message.BindResponse;
import org.apache.directory.api.ldap.model.message.BindResponseImpl;
import org.dom4j.Element;
import org.dom4j.tree.DefaultElement;


/**
@@ -33,6 +34,8 @@
*/
public class BindResponseDsml extends AbstractResultResponseDsml<BindResponse> implements BindResponse
{
private static final String AUTH_RESPONSE_TAG = "authResponse";

/**
* Creates a new getDecoratedMessage() of AuthResponseDsml.
*
@@ -62,7 +65,17 @@ public BindResponseDsml( LdapApiService codec, BindResponse ldapMessage )
@Override
public Element toDsml( Element root )
{
Element element = root.addElement( "authResponse" );
Element element;

if ( root != null )
{
element = root.addElement( AUTH_RESPONSE_TAG );
}
else
{
element = new DefaultElement( AUTH_RESPONSE_TAG );
}


LdapResultDsml ldapResultDsml = new LdapResultDsml( getCodecService(),
getDecorated().getLdapResult(), getDecorated() );

0 comments on commit 8d16cfe

Please sign in to comment.