referral = new ReferralImpl();
searchResultReference.setReferral( referral );
}
// We have to handle the special case of a 0 length list of referrals
LdapURL url = LdapURL.EMPTY_URL;
if ( tlv.getLength() == 0 )
{
referral.addLdapUrl( "" );
}
else
{
String urlStr = Strings.utf8ToString(tlv.getValue().getData());
try
{
url = new LdapURL( urlStr );
referral.addLdapUrl( urlStr );
}
catch ( LdapURLEncodingException luee )
{
LOG.error( I18n.err( I18n.ERR_04021, urlStr, luee.getMessage() ) );