directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Is Dn(Dn) useful ?
Date Thu, 30 Jun 2011 09:13:05 GMT
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


Mime
View raw message