String id = attribute.getID();
String id = oidRegistry.getOid( ( String ) attribute.getID() );
    public static void preventRdnChangeOnModifyReplace( Name name, int mod, Attribute attribute )        throws NamingException    {        if ( mod != DirContext.REPLACE_ATTRIBUTE )        {            return;        }        Set rdnAttributes = getRdnAttributes( name );        String id = attribute.getID();        if ( !rdnAttributes.contains( id ) )        {            return;        }        // if the attribute values to delete are not specified then all values        // for the attribute are to be deleted in which case we must just throw        // a schema violation exception with the notAllowedOnRdn result code        if ( attribute.size() == 0 )        {            String msg = "Modify operation attempts to delete RDN attribute ";            msg += id + " on entry " + name + " violates schema constraints";            if ( log.isInfoEnabled() )            {                log.info( msg + ". SchemaChecker is throwing a schema violation exception." );            }            throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOTALLOWEDONRDN );        }        // from here on the modify operation replaces specific values        // of the Rdn attribute so we must check to make sure all the old        // rdn attribute values are present in the replacement set        String rdnValue = getRdnValue( id, name );        for ( int ii = 0; ii < attribute.size(); ii++ )        {            // if the old rdn value is not in the rdn attribute then            // we must complain with a schema violation            if ( !attribute.contains( rdnValue ) )            {                String msg = "Modify operation attempts to delete RDN attribute values in use for ";                msg += id + " on entry " + name + " and violates schema constraints";                if ( log.isInfoEnabled() )                {                    log.info( msg + ". SchemaChecker is throwing a schema violation exception." );                }                throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOTALLOWEDONRDN );            }        }    }