Hi guys,

this morning, I found a pretty big big in the Dn class. Doing something like :

Dn original = new Dn( schemaManager, "dc=example, dc=org" );
Dn copy = new Dn( original );

System.out.println( "Original DN : " + original );
System.out.println( "Copied DN : " + copy );

produces :

Original DN : dc=example, dc=org
Copied DN : dc=org, dc=example

Ok, the rdns are just copied in the reverse order. At first, I thought "WTF ? Why are the tests passing?" then Pierre-Arnaud replied :"Who cares to copy a Dn ? It's an immutable class anyway..." and I think he is plain on spot.

Should we remove the copy constructor (which seems not to be used anywhere ) ?

--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Reply via email to