String reqVal = ( String ) normalizer.normalize( value );
Object reqVal = normalizer.normalize( value );
    public boolean compare( Name name, String oid, Object value ) throws NamingException    {        DirectoryPartition partition = getBackend( name );        AttributeTypeRegistry registry = factoryCfg.getGlobalRegistries().getAttributeTypeRegistry();        // complain if we do not recognize the attribute being compared        if ( ! registry.hasAttributeType( oid ) )        {            throw new LdapInvalidAttributeIdentifierException( oid + " not found within the attributeType registry" );        }        AttributeType attrType = registry.lookup( oid );        Attribute attr = partition.lookup( name ).get( attrType.getName() );        // complain if the attribute being compared does not exist in the entry        if ( attr == null )        {            throw new LdapNoSuchAttributeException();        }        // see first if simple match without normalization succeeds        if ( attr.contains( value ) )        {            return true;        }        // now must apply normalization to all values (attr and in request) to compare        /*         * Get ahold of the normalizer for the attribute and normalize the request         * assertion value for comparisons with normalized attribute values.  Loop         * through all values looking for a match.         */        Normalizer normalizer = attrType.getEquality().getNormalizer();        String reqVal = ( String ) normalizer.normalize( value );        for ( int ii = 0; ii < attr.size(); ii++ )        {            String attrVal = ( String ) normalizer.normalize( attr.get( ii ) );            if ( attrVal.equals( reqVal ) )            {                return true;            }        }        return false;    }