Le 10/23/12 9:01 PM, Stefan Seelmann a écrit :
On 23.10.2012 13:13, Pierre-Arnaud Marcelot wrote:
Hi Kiran,
On 23 oct. 2012, at 12:05, Kiran Ayyagari <kayyag...@apache.org> wrote:
yeap, like we just discussed, we can certainly do that, the two things
that immediately come to my mind are
1. the impact of such a change in the code
It can be important, I haven't checked yet.
<smartass>
$ cd apacheds
$ find . -name "*.java" | xargs grep "uid=admin,ou=system" | wc -l
200
$ find . -name "*.java" | xargs grep "ou=system" | wc -l
2743
Seems to be a good opportunity to define a constant and to follow the
DRY rule ;-)
The constants already exist :
/** The system DN */
public static final String SYSTEM_DN = "ou=system";
/** the default user principal or DN */
public static final String ADMIN_SYSTEM_DN = "uid=admin,ou=system";
(in ServerDNConstants.java)
We also have :
shared/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultSchema.java:
protected static final String DEFAULT_OWNER = "uid=admin,ou=system";
We simply don't use them in many places, like tests (actually, we use
the "uid=admin,ou=system" string in 5 files only which are not tests.)
More scarrying :
$ find apacheds -name "*.ldif" | xargs grep -i "ou=system" | wc -l
10155
...
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com