MatchingRule equality = attributeType.getEquality();
if ( equality != null )
{
// If we have an Equality MR, we *must* have a normalizer
Normalizer normalizer = equality.getNormalizer();
if ( normalizer != null )
{
if ( wrappedValue != null )
{
boolean isHR = attributeType.getSyntax().isHumanReadable();
if ( isHR != isHumanReadable() )
{
String message = "The '" + attributeType.getName() + "' AttributeType and values must " +
"both be String or binary";
LOG.error( message );
throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, message );
}
try
{
if ( isHumanReadable() )
{
normalizedValue = ( T ) normalizer.normalize( ( String ) wrappedValue );
}
else
{
normalizedValue = ( T ) normalizer.normalize( new BinaryValue( ( byte[] ) wrappedValue ) )
.getNormReference();
}
}
catch ( LdapException ne )
{