Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.1.3
-
None
Description
Hello,
the behavior of the following test changed with latest directory api version:
@Test void ancestorCheck() throws LdapInvalidDnException { DefaultSchemaManager schemaManager = new DefaultSchemaManager(); Dn group = new Dn( schemaManager, "ou=group,ou=base" ); Dn base = new Dn( schemaManager, "ou=base" ); Dn ancestor = group.getAncestorOf( "ou=group" ); assertThat( ancestor, is( equalTo( base ) ) ); }
with version 2.1.2 the test succeeded, but fails with 2.1.3
In the latest 2.1.3 version the code in
org.apache.directory.api.ldap.model.name.Dn.getAncestorOf(Dn)
changed from
newDn.toUpName();
to
newDn.upName = upName.substring( descendant.upName.length() + 1 );
but now the normName of the DN is not set (code in the toUpName() method) and the equality check failed.
Greetings Thomas