On Thu, Feb 2, 2012 at 1:14 AM, Christoph Czurda <hasnoadditi...@gmail.com>wrote:
> On 02/01/2012 11:58 PM, Alex Karasulu wrote: > > On Wed, Feb 1, 2012 at 10:19 PM, Christoph Czurda > > <hasnoadditi...@gmail.com>wrote: > > > >> Hi Pierre-Arnaud, > >> > >> The mistake was on my side. I used Rdn rdn = new Rdn("cn=a,ou=b"); and > >> passed this to a Dn constructor. I misinterpreted the description of > >> class Rdn where it says that any String with a '=' is treated as a full > >> Rdn. When I changed it, it worked as expected. > >> > >> > > Just curious can you show me the offending code? I really did not > > understand your description. > > > > I ask this because it might show which area of our API is weak in terms > of > > being intuitive. If the user understands the domain a good API shows > > exactly how it should be used by the object model and methods. > > > > > It was like this: > Dn parent = new Dn("ou=system"); > Dn somewhereBelow = new Dn(new Rdn("cn=a,cn=b"),parent); //the problem > was the rdn > > I thought that in this constructor everything before the parent is > simply prepended. So if understand correctly you thought Rdn is not a single name component but one that can have 1 or more name components like for example a relative path in the fs namespace? > The interesting thing is that dn.getName() did what I > actually intended, ie it returns "cn=a,cn=b,ou=system". > > Odd. Thanks for the feedback. -- Best Regards, -- Alex