You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Thomas Gaebler (Jira)" <ji...@apache.org> on 2023/06/13 14:34:00 UTC

[jira] [Created] (DIRAPI-393) DN comparison behavior changed after parsing ancestor

Thomas Gaebler created DIRAPI-393:
-------------------------------------

             Summary: DN comparison behavior changed after parsing ancestor
                 Key: DIRAPI-393
                 URL: https://issues.apache.org/jira/browse/DIRAPI-393
             Project: Directory Client API
          Issue Type: Bug
    Affects Versions: 2.1.3
            Reporter: Thomas Gaebler


Hello,

the behavior of  the following test changed with latest directory api version:

 
{code:java}
@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 ) ) );
}{code}
with version 2.1.2 the test succeeded, but fails with 2.1.3

 

In the latest 2.1.3 version the code in
{code:java}
org.apache.directory.api.ldap.model.name.Dn.getAncestorOf(Dn){code}
changed from
{code:java}
newDn.toUpName();{code}
to
{code:java}
newDn.upName = upName.substring( descendant.upName.length() + 1 );{code}
but now the normName of the DN is not set (code in the toUpName() method) and the equality check failed.

Greetings Thomas



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For additional commands, e-mail: dev-help@directory.apache.org