Skip to content
Permalink
Browse files
fix for DIRAPI-366
  • Loading branch information
elecharny committed Feb 19, 2021
1 parent f7944a8 commit dcb5ab04a8415434102c0f7f2ecb411763f0f61a
Showing 1 changed file with 11 additions and 1 deletion.
@@ -29,6 +29,7 @@
import org.apache.directory.api.ldap.codec.api.LdapMessageContainer;
import org.apache.directory.api.ldap.model.message.Control;
import org.apache.directory.api.ldap.model.message.Message;
import org.apache.directory.api.ldap.model.message.controls.OpaqueControl;
import org.apache.directory.api.util.Strings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -78,7 +79,16 @@ public void action( LdapMessageContainer<Message> container ) throws DecoderExce
if ( tlv.getLength() >= 0 )
{
ControlFactory<?> factory = container.getControlFactory();
factory.decodeValue( control, value.getData() );

if ( factory == null )
{
// We don't know about this control, so it's an opaque control
( ( OpaqueControl ) control ).setEncodedValue( value.getData() );
}
else
{
factory.decodeValue( control, value.getData() );
}
}

// We can have an END transition

0 comments on commit dcb5ab0

Please sign in to comment.