if (attributeNames == null)
{
throw new IllegalArgumentException("attributes is null");
}
LDAPIdentityObjectImpl ldapIdentity = getSafeLDAPIO(ctx, identity);
// as this is valid LDAPIdentityObjectImpl DN is obtained from the Id
String dn = ldapIdentity.getDn();
LdapContext ldapContext = getLDAPContext(ctx);
try
{