directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1070362 [2/2] - in /directory: apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/ apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/schema/ apacheds/branches/m1/core-api/src/main/java/o...
Date Mon, 14 Feb 2011 01:45:31 GMT
Modified: directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/StoreUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/StoreUtils.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/StoreUtils.java
(original)
+++ directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/StoreUtils.java
Mon Feb 14 01:45:29 2011
@@ -60,7 +60,7 @@ public class StoreUtils
     @SuppressWarnings("PMD.AvoidUsingHardCodedIP")
     public static void loadExampleData( Store<Entry, Long> store, SchemaManager schemaManager
) throws Exception
     {
-        Dn suffixDn = new Dn( "o=Good Times Co.", schemaManager );
+        Dn suffixDn = new Dn( schemaManager, "o=Good Times Co." );
         store.setSuffixDn( suffixDn );
 
         store.init( schemaManager );
@@ -74,7 +74,7 @@ public class StoreUtils
         injectEntryInStore( store, entry );
 
         // Entry #2
-        Dn dn = new Dn( "ou=Sales,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "ou=Sales,o=Good Times Co." );
         entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "organizationalUnit" );
         entry.add( "ou", "Sales" );
@@ -83,7 +83,7 @@ public class StoreUtils
         injectEntryInStore( store, entry );
 
         // Entry #3
-        dn = new Dn( "ou=Board of Directors,o=Good Times Co.", schemaManager );
+        dn = new Dn( schemaManager, "ou=Board of Directors,o=Good Times Co." );
         entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "organizationalUnit" );
         entry.add( "ou", "Board of Directors" );
@@ -92,7 +92,7 @@ public class StoreUtils
         injectEntryInStore( store, entry );
 
         // Entry #4
-        dn = new Dn( "ou=Engineering,o=Good Times Co.", schemaManager );
+        dn = new Dn( schemaManager, "ou=Engineering,o=Good Times Co." );
         entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "organizationalUnit" );
         entry.add( "ou", "Engineering" );
@@ -101,7 +101,7 @@ public class StoreUtils
         injectEntryInStore( store, entry );
 
         // Entry #5
-        dn = new Dn( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
+        dn = new Dn( schemaManager, "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
         entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Sales" );
@@ -112,7 +112,7 @@ public class StoreUtils
         injectEntryInStore( store, entry );
 
         // Entry #6
-        dn = new Dn( "cn=JIM BEAN,ou=Sales,o=Good Times Co.", schemaManager );
+        dn = new Dn( schemaManager, "cn=JIM BEAN,ou=Sales,o=Good Times Co." );
         entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Sales" );
@@ -123,7 +123,7 @@ public class StoreUtils
         injectEntryInStore( store, entry );
 
         // Entry #7
-        dn = new Dn( "ou=Apache,ou=Board of Directors,o=Good Times Co.", schemaManager );
+        dn = new Dn( schemaManager, "ou=Apache,ou=Board of Directors,o=Good Times Co." );
         entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "organizationalUnit" );
         entry.add( "ou", "Apache" );
@@ -132,7 +132,7 @@ public class StoreUtils
         injectEntryInStore( store, entry );
 
         // Entry #8
-        dn = new Dn( "cn=Jack Daniels,ou=Engineering,o=Good Times Co.", schemaManager );
+        dn = new Dn( schemaManager, "cn=Jack Daniels,ou=Engineering,o=Good Times Co." );
         entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Engineering" );
@@ -145,7 +145,7 @@ public class StoreUtils
         // aliases -------------
 
         // Entry #9
-        dn = new Dn( "commonName=Jim Bean,ou=Apache,ou=Board of Directors,o=Good Times Co.",
schemaManager );
+        dn = new Dn( schemaManager, "commonName=Jim Bean,ou=Apache,ou=Board of Directors,o=Good
Times Co." );
         entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "alias", "extensibleObject" );
         entry.add( "ou", "Apache" );
@@ -154,7 +154,7 @@ public class StoreUtils
         injectEntryInStore( store, entry );
 
         // Entry #10
-        dn = new Dn( "commonName=Jim Bean,ou=Board of Directors,o=Good Times Co.", schemaManager
);
+        dn = new Dn( schemaManager, "commonName=Jim Bean,ou=Board of Directors,o=Good Times
Co." );
         entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "alias", "extensibleObject" );
         entry.add( "commonName", "Jim Bean" );
@@ -162,7 +162,7 @@ public class StoreUtils
         injectEntryInStore( store, entry );
 
         // Entry #11
-        dn = new Dn( "2.5.4.3=Johnny Walker,ou=Engineering,o=Good Times Co.", schemaManager
);
+        dn = new Dn( schemaManager, "2.5.4.3=Johnny Walker,ou=Engineering,o=Good Times Co."
);
         entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "alias", "extensibleObject" );
         entry.add( "ou", "Engineering" );

Modified: directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlStoreTest.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlStoreTest.java
(original)
+++ directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlStoreTest.java
Mon Feb 14 01:45:29 2011
@@ -123,7 +123,7 @@ public class AvlStoreTest
             fail( "Schema load failed : " + Exceptions.printErrors(schemaManager.getErrors())
);
         }
 
-        EXAMPLE_COM = new Dn( "dc=example,dc=com", schemaManager );
+        EXAMPLE_COM = new Dn( schemaManager, "dc=example,dc=com" );
 
         OU_AT = schemaManager.getAttributeType( SchemaConstants.OU_AT );
         DC_AT = schemaManager.getAttributeType( SchemaConstants.DC_AT );
@@ -402,7 +402,7 @@ public class AvlStoreTest
     @Test
     public void testFreshStore() throws Exception
     {
-        Dn dn = new Dn( "o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "o=Good Times Co." );
         assertEquals( 1L, ( long ) store.getEntryId( dn ) );
         assertEquals( 11, store.count() );
 
@@ -433,7 +433,7 @@ public class AvlStoreTest
         assertEquals( 10, store.count() );
 
         // add an alias and delete to test dropAliasIndices method
-        Dn dn = new Dn( "commonName=Jack Daniels,ou=Apache,ou=Board of Directors,o=Good Times
Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "commonName=Jack Daniels,ou=Apache,ou=Board of Directors,o=Good
Times Co." );
         DefaultEntry entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "alias", "extensibleObject" );
         entry.add( "ou", "Apache" );
@@ -481,7 +481,7 @@ public class AvlStoreTest
         assertFalse( cursor.next() );
 
         // dn id 12
-        Dn martinDn = new Dn( "cn=Marting King,ou=Sales,o=Good Times Co.", schemaManager
);
+        Dn martinDn = new Dn( schemaManager, "cn=Marting King,ou=Sales,o=Good Times Co."
);
         DefaultEntry entry = new DefaultEntry( schemaManager, martinDn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Sales" );
@@ -495,7 +495,7 @@ public class AvlStoreTest
         assertTrue( cursor.previous() );
         assertEquals( 12, ( long ) cursor.get().getId() );
 
-        Dn newParentDn = new Dn( "ou=Board of Directors,o=Good Times Co.", schemaManager
);
+        Dn newParentDn = new Dn( schemaManager, "ou=Board of Directors,o=Good Times Co."
);
 
         Dn newDn = newParentDn.add( martinDn.getRdn() );
         store.move( martinDn, newParentDn, newDn, new ClonedServerEntry( entry ) );
@@ -506,7 +506,7 @@ public class AvlStoreTest
         assertEquals( 12, ( long ) cursor.get().getId() );
 
         // dn id 13
-        Dn marketingDn = new Dn( "ou=Marketing,ou=Sales,o=Good Times Co.", schemaManager
);
+        Dn marketingDn = new Dn( schemaManager, "ou=Marketing,ou=Sales,o=Good Times Co."
);
         entry = new DefaultEntry( schemaManager, marketingDn );
         entry.add( "objectClass", "top", "organizationalUnit" );
         entry.add( "ou", "Marketing" );
@@ -515,7 +515,7 @@ public class AvlStoreTest
         store.add( entry );
 
         // dn id 14
-        Dn jimmyDn = new Dn( "cn=Jimmy Wales,ou=Marketing, ou=Sales,o=Good Times Co.", schemaManager
);
+        Dn jimmyDn = new Dn( schemaManager, "cn=Jimmy Wales,ou=Marketing, ou=Sales,o=Good
Times Co." );
         entry = new DefaultEntry( schemaManager, jimmyDn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Marketing" );
@@ -572,7 +572,7 @@ public class AvlStoreTest
     @Test(expected = LdapNoSuchObjectException.class)
     public void testAddWithoutParentId() throws Exception
     {
-        Dn dn = new Dn( "cn=Marting King,ou=Not Present,o=Good Times Co.", schemaManager
);
+        Dn dn = new Dn( schemaManager, "cn=Marting King,ou=Not Present,o=Good Times Co."
);
         DefaultEntry entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Not Present" );
@@ -584,7 +584,7 @@ public class AvlStoreTest
     @Test(expected = LdapSchemaViolationException.class)
     public void testAddWithoutObjectClass() throws Exception
     {
-        Dn dn = new Dn( "cn=Martin King,ou=Sales,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=Martin King,ou=Sales,o=Good Times Co." );
         DefaultEntry entry = new DefaultEntry( schemaManager, dn );
         entry.add( "ou", "Sales" );
         entry.add( "cn", "Martin King" );
@@ -595,7 +595,7 @@ public class AvlStoreTest
     @Test
     public void testModifyAddOUAttrib() throws Exception
     {
-        Dn dn = new Dn( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.OU_AT, OU_AT );
@@ -612,7 +612,7 @@ public class AvlStoreTest
     @Test
     public void testRename() throws Exception
     {
-        Dn dn = new Dn( "cn=Pivate Ryan,ou=Engineering,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=Pivate Ryan,ou=Engineering,o=Good Times Co." );
         DefaultEntry entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Engineering" );
@@ -631,7 +631,7 @@ public class AvlStoreTest
     @Test
     public void testRenameEscaped() throws Exception
     {
-        Dn dn = new Dn( "cn=Pivate Ryan,ou=Engineering,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=Pivate Ryan,ou=Engineering,o=Good Times Co." );
         DefaultEntry entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Engineering" );
@@ -645,7 +645,7 @@ public class AvlStoreTest
 
         store.rename( dn, rdn, true );
 
-        Dn dn2 = new Dn( "sn=Ja\\+es,ou=Engineering,o=Good Times Co.", schemaManager );
+        Dn dn2 = new Dn( schemaManager, "sn=Ja\\+es,ou=Engineering,o=Good Times Co." );
         Long id = store.getEntryId( dn2 );
         assertNotNull( id );
         Entry entry2 = store.lookup( id );
@@ -656,7 +656,7 @@ public class AvlStoreTest
     @Test
     public void testMove() throws Exception
     {
-        Dn childDn = new Dn( "cn=Pivate Ryan,ou=Engineering,o=Good Times Co.", schemaManager
);
+        Dn childDn = new Dn( schemaManager, "cn=Pivate Ryan,ou=Engineering,o=Good Times Co."
);
         DefaultEntry childEntry = new DefaultEntry( schemaManager, childDn );
         childEntry.add( "objectClass", "top", "person", "organizationalPerson" );
         childEntry.add( "ou", "Engineering" );
@@ -666,16 +666,16 @@ public class AvlStoreTest
 
         store.add( childEntry );
 
-        Dn parentDn = new Dn( "ou=Sales,o=Good Times Co.", schemaManager );
+        Dn parentDn = new Dn( schemaManager, "ou=Sales,o=Good Times Co." );
 
         Rdn rdn = new Rdn( "cn=Ryan" );
 
         store.moveAndRename( childDn, parentDn, rdn, new ClonedServerEntry( childEntry ),
true );
 
         // to drop the alias indices   
-        childDn = new Dn( "commonName=Jim Bean,ou=Apache,ou=Board of Directors,o=Good Times
Co.", schemaManager );
+        childDn = new Dn( schemaManager, "commonName=Jim Bean,ou=Apache,ou=Board of Directors,o=Good
Times Co." );
 
-        parentDn = new Dn( "ou=Engineering,o=Good Times Co.", schemaManager );
+        parentDn = new Dn( schemaManager, "ou=Engineering,o=Good Times Co." );
 
         assertEquals( 3, store.getSubAliasIndex().count() );
 
@@ -689,7 +689,7 @@ public class AvlStoreTest
     @Test
     public void testModifyAdd() throws Exception
     {
-        Dn dn = new Dn( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.SURNAME_AT, schemaManager
@@ -720,7 +720,7 @@ public class AvlStoreTest
     @Test
     public void testModifyReplace() throws Exception
     {
-        Dn dn = new Dn( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.SN_AT, schemaManager
@@ -752,7 +752,7 @@ public class AvlStoreTest
     @Test
     public void testModifyRemove() throws Exception
     {
-        Dn dn = new Dn( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.SN_AT, schemaManager
@@ -784,7 +784,7 @@ public class AvlStoreTest
     @Test
     public void testModifyReplaceNonExistingIndexAttribute() throws Exception
     {
-        Dn dn = new Dn( "cn=Tim B,ou=Sales,o=Good Times Co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=Tim B,ou=Sales,o=Good Times Co." );
         DefaultEntry entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "cn", "Tim B" );

Modified: directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
(original)
+++ directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
Mon Feb 14 01:45:29 2011
@@ -605,7 +605,7 @@ public class GreaterEqTest
         assertNotNull( evaluator.getNormalizer() );
         assertNotNull( evaluator.getComparator() );
 
-        Dn dn = new Dn( "cn=jane doe,o=good times co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=jane doe,o=good times co." );
         Entry attrs = new DefaultEntry( schemaManager, dn );
         attrs.add( "objectClass", "person" );
         attrs.add( "c-street", "3" );

Modified: directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
(original)
+++ directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
Mon Feb 14 01:45:29 2011
@@ -631,7 +631,7 @@ public class LessEqTest
         assertNotNull( evaluator.getNormalizer() );
         assertNotNull( evaluator.getComparator() );
 
-        Dn dn = new Dn( "cn=jane doe,o=good times co.", schemaManager );
+        Dn dn = new Dn( schemaManager, "cn=jane doe,o=good times co." );
         Entry attrs = new DefaultEntry( schemaManager, dn );
         attrs.add( "objectClass", "person" );
         attrs.add( "c-street", "1" );

Modified: directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java
(original)
+++ directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java
Mon Feb 14 01:45:29 2011
@@ -660,8 +660,8 @@ public class OneLevelScopeTest
     @Test
     public void testCursorWithDereferencing3() throws Exception
     {
-        Dn dn = new Dn( SchemaConstants.CN_AT_OID + "=jd," + SchemaConstants.OU_AT_OID +
"=board of directors,"
-            + SchemaConstants.O_AT_OID + "=good times co.", schemaManager );
+        Dn dn = new Dn( schemaManager, SchemaConstants.CN_AT_OID + "=jd," + SchemaConstants.OU_AT_OID
+ "=board of directors,"
+            + SchemaConstants.O_AT_OID + "=good times co." );
 
         Entry attrs = new DefaultEntry( schemaManager, dn );
         attrs.add( "objectClass", "alias", "extensibleObject" );
@@ -671,8 +671,8 @@ public class OneLevelScopeTest
         attrs.add( "entryUUID", UUID.randomUUID().toString() );
         store.add( attrs );
 
-        dn = new Dn( SchemaConstants.CN_AT_OID + "=jdoe," + SchemaConstants.OU_AT_OID + "=board
of directors,"
-            + SchemaConstants.O_AT_OID + "=good times co.", schemaManager );
+        dn = new Dn( schemaManager, SchemaConstants.CN_AT_OID + "=jdoe," + SchemaConstants.OU_AT_OID
+ "=board of directors,"
+            + SchemaConstants.O_AT_OID + "=good times co." );
 
         attrs = new DefaultEntry( schemaManager, dn );
         attrs.add( "objectClass", "person" );

Modified: directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java
(original)
+++ directory/apacheds/branches/m1/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java
Mon Feb 14 01:45:29 2011
@@ -623,8 +623,8 @@ public class SubtreeScopeTest
     @Test
     public void testCursorWithDereferencing3() throws Exception
     {
-        Dn dn = new Dn( SchemaConstants.CN_AT_OID + "=jd," + SchemaConstants.OU_AT_OID +
"=board of directors,"
-            + SchemaConstants.O_AT_OID + "=good times co.", schemaManager );
+        Dn dn = new Dn( schemaManager, SchemaConstants.CN_AT_OID + "=jd," + SchemaConstants.OU_AT_OID
+ "=board of directors,"
+            + SchemaConstants.O_AT_OID + "=good times co." );
 
         Entry attrs = new DefaultEntry( schemaManager, dn );
         attrs.add( "objectClass", "alias", "extensibleObject" );
@@ -634,8 +634,8 @@ public class SubtreeScopeTest
         attrs.add( "entryUUID", UUID.randomUUID().toString() );
         store.add( attrs );
 
-        dn = new Dn( SchemaConstants.CN_AT_OID + "=jdoe," + SchemaConstants.OU_AT_OID + "=board
of directors,"
-            + SchemaConstants.O_AT_OID + "=good times co.", schemaManager );
+        dn = new Dn( schemaManager, SchemaConstants.CN_AT_OID + "=jdoe," + SchemaConstants.OU_AT_OID
+ "=board of directors,"
+            + SchemaConstants.O_AT_OID + "=good times co." );
 
         attrs = new DefaultEntry( schemaManager, dn );
         attrs.add( "objectClass", "person" );

Modified: directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java
(original)
+++ directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java
Mon Feb 14 01:45:29 2011
@@ -25,8 +25,8 @@ import static org.junit.Assert.assertTru
 import static org.junit.Assert.fail;
 
 import org.apache.directory.shared.dsmlv2.request.Dsmlv2Grammar;
-import org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapCodecService;
 import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
+import org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapCodecService;
 import org.xmlpull.v1.XmlPullParserException;
 
 /**

Modified: directory/shared/branches/m1/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
(original)
+++ directory/shared/branches/m1/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
Mon Feb 14 01:45:29 2011
@@ -57,12 +57,9 @@ import org.apache.directory.ldap.client.
 import org.apache.directory.ldap.client.api.future.SearchFuture;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.util.OID;
-import org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapCodecService;
 import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
 import org.apache.directory.shared.ldap.codec.api.MessageEncoderException;
-import org.apache.directory.shared.ldap.model.message.extended.AddNoDResponse;
-import org.apache.directory.shared.ldap.model.message.extended.*;
-import org.apache.directory.shared.ldap.model.message.extended.ModifyDnNoDResponse;
+import org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapCodecService;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.constants.SupportedSaslMechanisms;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
@@ -117,6 +114,14 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.UnbindRequest;
 import org.apache.directory.shared.ldap.model.message.UnbindRequestImpl;
 import org.apache.directory.shared.ldap.model.message.controls.OpaqueControl;
+import org.apache.directory.shared.ldap.model.message.extended.AddNoDResponse;
+import org.apache.directory.shared.ldap.model.message.extended.BindNoDResponse;
+import org.apache.directory.shared.ldap.model.message.extended.CompareNoDResponse;
+import org.apache.directory.shared.ldap.model.message.extended.DeleteNoDResponse;
+import org.apache.directory.shared.ldap.model.message.extended.ExtendedNoDResponse;
+import org.apache.directory.shared.ldap.model.message.extended.ModifyDnNoDResponse;
+import org.apache.directory.shared.ldap.model.message.extended.ModifyNoDResponse;
+import org.apache.directory.shared.ldap.model.message.extended.NoticeOfDisconnect;
 import org.apache.directory.shared.ldap.model.message.extended.SearchNoDResponse;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.name.Rdn;
@@ -213,7 +218,7 @@ public class LdapNetworkConnection exten
 
     /** The Ldap codec protocol filter */
     private IoFilter ldapProtocolFilter = new ProtocolCodecFilter( codec.newProtocolCodecFactory(
true ) );
-    
+
     /** the SslFilter key */
     private static final String SSL_FILTER_KEY = "sslFilter";
 
@@ -531,7 +536,7 @@ public class LdapNetworkConnection exten
         CloseFuture closeFuture = connectionFuture.getSession().getCloseFuture();
 
         // Add a listener to close the session in the session.
-        closeFuture.addListener( ( IoFutureListener<?> ) new IoFutureListener<IoFuture>()
+        closeFuture.addListener( new IoFutureListener<IoFuture>()
         {
             public void operationComplete( IoFuture future )
             {
@@ -1584,11 +1589,12 @@ public class LdapNetworkConnection exten
 
     /**
      * Handle the exception we got.
-     * 
+     *
      * @param session The session we got the exception on
      * @param cause The exception cause
      * @throws Exception The t
      */
+    @Override
     public void exceptionCaught( IoSession session, Throwable cause ) throws Exception
     {
         LOG.warn( cause.getMessage(), cause );
@@ -1631,11 +1637,12 @@ public class LdapNetworkConnection exten
     /**
      * Handle the incoming LDAP messages. This is where we feed the cursor for search
      * requests, or call the listener.
-     * 
+     *
      * @param session The session that received a message
      * @param message The received message
      * @throws Exception If there is some error while processing the message
      */
+    @Override
     public void messageReceived( IoSession session, Object message ) throws Exception
     {
         // Feed the response and store it into the session
@@ -1814,13 +1821,13 @@ public class LdapNetworkConnection exten
                 if ( responseFuture instanceof SearchFuture )
                 {
                     intermediateResponse = new IntermediateResponseImpl( messageId );
-                    addControls( intermediateResponse, ( IntermediateResponse ) response
);
+                    addControls( intermediateResponse, response );
                     ( ( SearchFuture ) responseFuture ).set( intermediateResponse );
                 }
                 else if ( responseFuture instanceof ExtendedFuture )
                 {
                     intermediateResponse = new IntermediateResponseImpl( messageId );
-                    addControls( intermediateResponse, ( IntermediateResponse ) response
);
+                    addControls( intermediateResponse, response );
                     ( ( ExtendedFuture ) responseFuture ).set( intermediateResponse );
                 }
                 else
@@ -3010,7 +3017,7 @@ public class LdapNetworkConnection exten
         }
         catch ( LdapNoPermissionException lnpe )
         {
-            // Special case to deal with insufficient permissions 
+            // Special case to deal with insufficient permissions
             return false;
         }
         catch ( LdapException le )
@@ -3063,7 +3070,7 @@ public class LdapNetworkConnection exten
             searchRequest.setScope( SearchScope.OBJECT );
             searchRequest.addAttributes( attributes );
             searchRequest.setDerefAliases( AliasDerefMode.DEREF_ALWAYS );
-            
+
             if ( ( controls != null ) && ( controls.length > 0 ) )
             {
                 searchRequest.addAllControls( controls );
@@ -3181,9 +3188,9 @@ public class LdapNetworkConnection exten
 
     /**
      * loads schema using the specified schema loader
-     * 
+     *
      * @param loader the {@link SchemaLoader} to be used to load schema
-     * @throws LdapException 
+     * @throws LdapException
      */
     public void loadSchema( SchemaLoader loader ) throws LdapException
     {
@@ -3274,8 +3281,8 @@ public class LdapNetworkConnection exten
     {
         return codec;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -3439,7 +3446,8 @@ public class LdapNetworkConnection exten
 
     /**
      * Sends the StartTLS extended request to server and adds a security layer
-     * upon receiving a response with successful result
+     * upon receiving a response with successful result. Note that we will use
+     * the default LDAP connection.
      *
      * @throws LdapException
      */
@@ -3473,7 +3481,7 @@ public class LdapNetworkConnection exten
 
 
     /**
-     * adds {@link SslFilter} to the IOConnector or IOSession's filter chain 
+     * adds {@link SslFilter} to the IOConnector or IOSession's filter chain
      */
     private void addSslFilter() throws LdapException
     {
@@ -3506,7 +3514,7 @@ public class LdapNetworkConnection exten
 
 
     /**
-     * perform SASL based bind operation @see {@link #bindSasl(SaslRequest)} 
+     * perform SASL based bind operation @see {@link #bindSasl(SaslRequest)}
      */
     private BindFuture bindSasl( String name, byte[] credentials, String saslMech, String
authzId, String realmName,
         Control... ctrls )
@@ -3580,13 +3588,13 @@ public class LdapNetworkConnection exten
                 throw new LdapException( message );
             }
 
-            // Corner case : the SASL mech might send an initial challenge, and we have to

+            // Corner case : the SASL mech might send an initial challenge, and we have to
             // deal with it immediately.
             if ( sc.hasInitialResponse() )
             {
                 byte[] challengeResponse = sc.evaluateChallenge( new byte[0] );
 
-                // Stores the challenge's response, and send it to the server 
+                // Stores the challenge's response, and send it to the server
                 bindRequest.setCredentials( challengeResponse );
                 writeBindRequest( bindRequest );
 
@@ -3698,13 +3706,13 @@ public class LdapNetworkConnection exten
 
     /**
      * method to write the kerberos config in the standard MIT kerberos format
-     * 
-     * This is required cause the JGSS api is not able to recognize the port value set 
+     *
+     * This is required cause the JGSS api is not able to recognize the port value set
      * in the system property java.security.krb5.kdc this issue makes it impossible
      * to set a kdc running non standard ports (other than 88)
-     *  
+     *
      * e.g localhost:6088
-     * 
+     *
      * <pre>
      * [libdefaults]
      *     default_realm = EXAMPLE.COM
@@ -3714,7 +3722,7 @@ public class LdapNetworkConnection exten
      *         kdc = localhost:6088
      *     }
      * </pre>
-     * 
+     *
      * @return the full path of the config file
      */
     private String createKrbConfFile( String realmName, String kdcHost, int kdcPort ) throws
IOException

Modified: directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
(original)
+++ directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
Mon Feb 14 01:45:29 2011
@@ -228,7 +228,7 @@ public class Dn implements Cloneable, Se
      */
     public Dn(String upName) throws LdapInvalidDnException
     {
-        this( upName, null );
+        this( null, upName );
     }
 
 
@@ -245,7 +245,7 @@ public class Dn implements Cloneable, Se
      * @param schemaManager the schema manager (optional)
      * @throws LdapInvalidNameException if the String does not contain a valid Dn.
      */
-    public Dn(String upName, SchemaManager schemaManager) throws LdapInvalidDnException
+    public Dn( SchemaManager schemaManager, String upName ) throws LdapInvalidDnException
     {
         if ( upName != null )
         {
@@ -379,29 +379,12 @@ public class Dn implements Cloneable, Se
 
 
     /**
-     * Creates a Dn.
-     *
-     * Note: This is mostly used internally in the server
-     *
-     * @param upName The user provided name
-     * @param normName the normalized name
-     * @param bytes the name as a byte[]
-     * @param rdnList the list of RDNs present in the Dn
-     */
-    public Dn(String upName, String normName, byte[] bytes, List<Rdn> rdnList)
-    {
-        this( upName, normName, bytes );
-        rdns.addAll( rdnList );
-    }
-
-
-    /**
      *
      * Creates a Dn by based on the given Rdn.
      *
      * @param rdn the Rdn to be used in the Dn
      */
-    public Dn(Rdn rdn)
+    public Dn( Rdn rdn )
     {
         rdns.add( rdn.clone() );
 
@@ -517,6 +500,7 @@ public class Dn implements Cloneable, Se
      *
      * @return A String representing the normalized Dn
      */
+    @Override
     public String toString()
     {
         return getName();
@@ -667,6 +651,7 @@ public class Dn implements Cloneable, Se
      * @see java.lang.Object#hashCode()
      * @return the instance hash code
      */
+    @Override
     public int hashCode()
     {
         int result = 37;
@@ -1025,7 +1010,7 @@ public class Dn implements Cloneable, Se
         for ( int i = rdns.size() - posn; i < rdns.size(); i++ )
         {
             // Don't forget to clone the rdns !
-            newDn.rdns.add( (Rdn) rdns.get( i ).clone() );
+            newDn.rdns.add( rdns.get( i ).clone() );
         }
 
         newDn.normName = newDn.toNormName();
@@ -1058,7 +1043,7 @@ public class Dn implements Cloneable, Se
         for ( int i = 0; i < size() - posn; i++ )
         {
             // Don't forget to clone the rdns !
-            newDn.rdns.add( (Rdn) rdns.get( i ).clone() );
+            newDn.rdns.add( rdns.get( i ).clone() );
         }
 
         newDn.normName = newDn.toNormName();
@@ -1283,6 +1268,31 @@ public class Dn implements Cloneable, Se
     /**
      * {@inheritDoc}
      */
+    public Dn add( int posn, Rdn rdn )
+    {
+        if ( ( posn < 0 ) || ( posn > size() ) )
+        {
+            String message = I18n.err( I18n.ERR_04206, posn, rdns.size() );
+            LOG.error( message );
+            throw new ArrayIndexOutOfBoundsException( message );
+        }
+
+        // We have to parse the nameComponent which is given as an argument
+        Rdn newRdn = rdn.clone();
+
+        Dn clonedDn = clone();
+
+        int realPos = clonedDn.size() - posn;
+        clonedDn.rdns.add( realPos, newRdn );
+        clonedDn.toUpName();
+
+        return clonedDn;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
     public Dn remove( int posn ) throws LdapInvalidDnException
     {
         if ( rdns.size() == 0 )
@@ -1339,6 +1349,7 @@ public class Dn implements Cloneable, Se
     /**
      * {@inheritDoc}
      */
+    @Override
     protected Dn clone()
     {
         try
@@ -1349,7 +1360,7 @@ public class Dn implements Cloneable, Se
 
             for ( Rdn rdn : rdns )
             {
-                dn.rdns.add( (Rdn) rdn.clone() );
+                dn.rdns.add( rdn.clone() );
             }
 
             return dn;
@@ -1366,11 +1377,12 @@ public class Dn implements Cloneable, Se
      * @see java.lang.Object#equals(java.lang.Object)
      * @return <code>true</code> if the two instances are equals
      */
+    @Override
     public boolean equals( Object obj )
     {
         if ( obj instanceof String )
         {
-            return normName.equals( ( String ) obj );
+            return normName.equals( obj );
         }
         else if ( obj instanceof Dn)
         {
@@ -1493,7 +1505,7 @@ public class Dn implements Cloneable, Se
         {
             // We have more than one ATAV for this Rdn. We will loop on all
             // ATAVs
-            Rdn rdnCopy = (Rdn) rdn.clone();
+            Rdn rdnCopy = rdn.clone();
             rdn.clear();
 
             for ( Ava val : rdnCopy )

Modified: directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/DnSerializer.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/DnSerializer.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/DnSerializer.java
(original)
+++ directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/DnSerializer.java
Mon Feb 14 01:45:29 2011
@@ -6,24 +6,22 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.ldap.model.name;
 
 import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
-import java.util.ArrayList;
-import java.util.List;
 
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.util.Strings;
@@ -52,17 +50,17 @@ public final class DnSerializer
 
     /**
      * Serialize a Dn
-     * 
+     *
      * We have to store a Dn data efficiently. Here is the structure :
-     * 
+     *
      * <li>upName</li> The User provided Dn<p>
-     * <li>normName</li> May be null if the normName is equivalent to 
+     * <li>normName</li> May be null if the normName is equivalent to
      * the upName<p>
      * <li>rdns</li> The rdn's List.<p>
-     * 
+     *
      * for each rdn :
      * <li>call the Rdn write method</li>
-     * 
+     *
      * @param dn The Dn to serialize
      * @param out the stream in which the Dn will be serialized
      * @throws IOException If we can't write in this stream
@@ -75,10 +73,10 @@ public final class DnSerializer
             LOG.error( message );
             throw new IOException( message );
         }
-        
+
         // Write the UPName
         Unicode.writeUTF(out, dn.getName());
-        
+
         // Write the NormName if different
         if ( dn.isNormalized() )
         {
@@ -97,13 +95,13 @@ public final class DnSerializer
             LOG.error( message );
             throw new IOException( message );
         }
-        
+
         // Should we store the byte[] ???
-        
+
         // Write the RDNs.
         // First the number of RDNs
         out.writeInt( dn.size() );
-        
+
         // Loop on the RDNs
         for ( Rdn rdn:dn.getRdns() )
         {
@@ -114,11 +112,11 @@ public final class DnSerializer
 
     /**
      * Deserialize a Dn
-     * 
+     *
      * We read back the data to create a new Dn. The structure
      * read is exposed in the {@link DnSerializer#serialize(Dn, ObjectOutput)}
      * method<p>
-     * 
+     *
      * @param in The input stream from which the Dn is read
      * @return a deserialized Dn
      * @throws IOException If the stream can't be read
@@ -127,10 +125,10 @@ public final class DnSerializer
     {
         // Read the UPName
         String upName = Unicode.readUTF(in);
-        
+
         // Read the NormName
         String normName = Unicode.readUTF(in);
-        
+
         if ( normName.length() == 0 )
         {
             // As the normName is equal to the upName,
@@ -138,20 +136,20 @@ public final class DnSerializer
             // restore it by copying the upName.
             normName = upName;
         }
-        
+
         // Should we read the byte[] ???
         byte[] bytes = Strings.getBytesUtf8(upName);
-        
+
         // Read the RDNs. Is it's null, the number will be -1.
         int nbRdns = in.readInt();
-        
-        List<Rdn> rdnList = new ArrayList<Rdn>();
+        Dn dn = new Dn( upName, normName, bytes );
+
         for ( int i = 0; i < nbRdns; i++ )
         {
             Rdn rdn = RdnSerializer.deserialize( in );
-            rdnList.add( rdn );
+            dn = dn.add( 0, rdn );
         }
-    
-        return new Dn( upName, normName, bytes, rdnList );
+
+        return dn;
     }
 }

Modified: directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/schema/comparators/DnComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/schema/comparators/DnComparator.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/schema/comparators/DnComparator.java
(original)
+++ directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/schema/comparators/DnComparator.java
Mon Feb 14 01:45:29 2011
@@ -20,10 +20,9 @@
 package org.apache.directory.shared.ldap.model.schema.comparators;
 
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.exception.LdapInvalidDnException;
-
-import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.LdapComparator;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
@@ -81,7 +80,7 @@ public class DnComparator extends LdapCo
         }
         else if ( obj instanceof String )
         {
-            dn = new Dn( ( String ) obj, schemaManager );
+            dn = new Dn( schemaManager, ( String ) obj );
         }
         else
         {

Modified: directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/schema/comparators/UniqueMemberComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/schema/comparators/UniqueMemberComparator.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/schema/comparators/UniqueMemberComparator.java
(original)
+++ directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/schema/comparators/UniqueMemberComparator.java
Mon Feb 14 01:45:29 2011
@@ -169,7 +169,7 @@ public class UniqueMemberComparator exte
         }
         else if ( obj instanceof String )
         {
-            dn = new Dn( ( String ) obj, schemaManager );
+            dn = new Dn( schemaManager, ( String ) obj );
         }
         else
         {

Modified: directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/DnNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/DnNormalizer.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/DnNormalizer.java
(original)
+++ directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/DnNormalizer.java
Mon Feb 14 01:45:29 2011
@@ -60,7 +60,7 @@ public class DnNormalizer extends Normal
         
         String dnStr = value.getString();
         
-        dn = new Dn( dnStr, schemaManager );
+        dn = new Dn( schemaManager, dnStr );
         
         return new StringValue( dn.getNormName() );
     }
@@ -73,7 +73,7 @@ public class DnNormalizer extends Normal
     {
         Dn dn = null;
         
-        dn = new Dn( value, schemaManager );
+        dn = new Dn( schemaManager, value );
         
         return dn.getNormName();
     }

Modified: directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/UniqueMemberNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/UniqueMemberNormalizer.java?rev=1070362&r1=1070361&r2=1070362&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/UniqueMemberNormalizer.java
(original)
+++ directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/schema/normalizers/UniqueMemberNormalizer.java
Mon Feb 14 01:45:29 2011
@@ -80,7 +80,7 @@ public class UniqueMemberNormalizer exte
             
             if ( sharpPos > 0 )
             {
-                Dn dn = new Dn( nameAndUid.substring( 0, sharpPos ), schemaManager );
+                Dn dn = new Dn( schemaManager, nameAndUid.substring( 0, sharpPos ) );
                 
                 return new StringValue( dn.getNormName() + '#' + uid );
             }
@@ -125,7 +125,7 @@ public class UniqueMemberNormalizer exte
             
             if ( sharpPos > 0 )
             {
-                Dn dn = new Dn( value.substring( 0, sharpPos ), schemaManager );
+                Dn dn = new Dn( schemaManager, value.substring( 0, sharpPos ) );
                 
                 return dn.getNormName() + '#' + uid;
             }
@@ -138,7 +138,7 @@ public class UniqueMemberNormalizer exte
         {
             // No UID, the strValue is a Dn
             // Return the normalized Dn
-            return new Dn( value, schemaManager ).getNormName();
+            return new Dn( schemaManager, value ).getNormName();
         }
     }
 



Mime
View raw message