directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <>
Subject [jira] Commented: (DIRSERVER-1576) DefaultDirectoryService uses Set operations on Partitions that don't implement equals
Date Tue, 26 Oct 2010 07:29:19 GMT


Emmanuel Lecharny commented on DIRSERVER-1576:

Thanks for the report. We will have a look at it as we are currently reviewing this part of
the code.

> DefaultDirectoryService uses Set operations on Partitions that don't implement equals
> -------------------------------------------------------------------------------------
>                 Key: DIRSERVER-1576
>                 URL:
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.5.7
>            Reporter: Andrew Swan
>            Priority: Minor
> performs both "add" and "remove"
operations on Sets of Partitions, however because most of the concrete Partition classes don't
override equals, these operations don't work as you might expect. The Set should be changed
to a Collection or Map, with addition or removal being based on whether any element contains
the same suffix DN as the one being added or removed. This would avoid stack traces like this
> javax.naming.ConfigurationException: ERR_263 Duplicate partition suffix: 0.9.2342.19200300.100.1.25=example,0.9.2342.19200300.100.1.25=
> com
>         at
>         at
>         at
>         at
>         at
>         at
>         at
>         at
>         at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(
>         at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(
> The workaround in the above case is for the caller of DirectoryService#addPartition to
first check whether the Set returned by DirectoryService#getPartitions already contains a
partition with the suffix being added. This duplication check should of course be encapsulated
within the DirectoryService.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message