|
[
Permlink
| « Hide
]
Alan Cabrera added a comment - 05/Feb/05 11:16 PM
Good catch. Do you have the unit tests for this?
Two test case to illustrate the problem (class org.apache.ldap.common.name.LdapNameTest) :
/** * Test the equivalence of two DNs, attributeType are not case sensitive * They MUST be equals. * * @throws NamingException if anything goes wrong. */ public void testInsensitiveTypeAttribut() throws NamingException { Name name1 = new LdapName("cn=HomeDir"); Name name2 = new LdapName("CN=HomeDir"); assertEquals(name1.compareTo(name2), 0); } /** * Test the equivalence of two DNs with multi-valued RDN. AttributeType are * not case sensitive. Each attribute type MUST be compared. They MUST be * equals. * * @throws NamingException if anything goes wrong. */ public void testInsensitiveTypeMultiValuedAttribut() throws NamingException { Name name1 = new LdapName("cn=HomeDir+cn=WorkDir"); Name name2 = new LdapName("cn=HomeDir+CN=WorkDir"); assertEquals(name1.compareTo(name2), 0); } This should be fixed now in the trunk thanks to your TestCase. Good work Emmanuel!
After reading the Name RFC, I realize I got it all wrong. It's not as trivial as I thought.
I think that this issue has been fixed by Alex a month ago. However, some test cases in LdapNameTest show that it's not anymore an issue.
|
||||||||||||||||||||||||||||||||||||||||||||||||||