{
String msg = I18n.err( I18n.ERR_04090 );
LOG.error( msg );
ModifyDnResponseImpl response = new ModifyDnResponseImpl( modifyDnRequest.getMessageId() );
throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX,
modifyDnRequest.getName(), null );
}
else
{
byte[] dnBytes = tlv.getValue().getData();
String dnStr = Strings.utf8ToString( dnBytes );
try
{
Dn dn = new Dn( dnStr );
newRdn = dn.getRdn( dn.size() - 1 );
}
catch ( LdapInvalidDnException ine )
{
String msg = "Invalid new Rdn given : " + dnStr + " (" + Strings.dumpBytes( dnBytes )
+ ") is invalid";
LOG.error( "{} : {}", msg, ine.getMessage() );
ModifyDnResponseImpl response = new ModifyDnResponseImpl( modifyDnRequest.getMessageId() );
throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX,
modifyDnRequest.getName(), ine );
}
modifyDnRequest.setNewRdn( newRdn );
}