You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Emmanuel Lécharny (Jira)" <ji...@apache.org> on 2023/06/13 21:23:00 UTC
[jira] [Resolved] (DIRAPI-393) DN comparison behavior changed after parsing ancestor
[ https://issues.apache.org/jira/browse/DIRAPI-393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Lécharny resolved DIRAPI-393.
--------------------------------------
Fix Version/s: 2.1.4
Resolution: Fixed
Bug confirmed and fixed with commit 6b1e50fbcd86c7f08b4d990e6be9dc7e535fa4c4
Thanks [~thomas_gaebler] !
> 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
> Priority: Major
> Fix For: 2.1.4
>
>
> 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