Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-202

Order of multi-valued RDN should not matters while comparing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • pre-1.0
    • pre-1.0
    • ldap
    • None

    Description

      class org.apache.ldap.common.name.LdapName, method compareTo should return 0 if we compare two RDN which contains multi-valued attributes like :

      cn=test+cn=result

      must be equals to

      cn=result+cn=test

      This is not the case. Here is a test case (to be added to class org.apache.ldap.common.name.LdapNameTest) :

      /**

      • Test the equivalence of two DNs with multi-valued RDN. AttributeType are
      • not case sensitive. Each attribute type MUST be compared. Order MUST not
      • matters They MUST be equals.
        *
      • @throws NamingException if anything goes wrong.
        */
        public void testInsensitiveTypeMultiValuedAttributNotOrdered() throws NamingException { Name name1 = new LdapName("cn=HomeDir+cn=WorkDir"); Name name2 = new LdapName("cn=WorkDir+cn=HomeDir"); assertEquals(name1.compareTo(name2), 0); }

      Attachments

        Activity

          People

            akarasulu Alex Karasulu
            elecharny Emmanuel Lécharny
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: