directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <>
Subject [jira] [Commented] (DIRSHARED-142) Value<?> objects containing byte[] of same content should be equals() == true
Date Tue, 30 Oct 2012 16:52:12 GMT


Emmanuel Lecharny commented on DIRSHARED-142:

You are right : the X-SCHEMA option is checked in the super class, something I have missed.

And, yes, we probably should compare the up-value first, before trying to check the normalized
values, as if the up values are equals, they will be equals. Now, we must also compare the
attributeType, because one could compare two values from two different attributeTypes, and
even if the values are equals, they should bot be considered as if they were equal...

I have to think about the consequences of such a change, but there are things to fix, that's
100% sure ! Good catch !
> Value<?> objects containing byte[] of same content should be equals() == true
> -----------------------------------------------------------------------------
>                 Key: DIRSHARED-142
>                 URL:
>             Project: Directory Shared
>          Issue Type: Bug
>    Affects Versions: 1.0.0-M13
>            Reporter: Hendy Irawan
> 1. get two Attribute objects from different sources, e.g. from LDAP connection vs. by
creating an entry programmatically
> 2. attribute1.get().equals( attribute2.get() ) will return false, which is wrong, because
> Arrays.equals((byte[])attribute1.get().getNormValue(), (byte[]) attribute2.get().getNormValue())
> will return true in this case.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message