directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1133062 - in /directory/apacheds/trunk: core-api/src/test/java/org/apache/directory/server/core/ core-integ/src/test/java/org/apache/directory/server/core/jndi/ core-integ/src/test/java/org/apache/directory/server/core/normalization/ core-...
Date Tue, 07 Jun 2011 16:06:17 GMT
Author: elecharny
Date: Tue Jun  7 16:06:16 2011
New Revision: 1133062

URL: http://svn.apache.org/viewvc?rev=1133062&view=rev
Log:
Fix for DIRSERVER-1440
o Fixed many tests in core-integ and server-integ to correctly handle auto-injection of RDN
in entries
o Do not anymore inject the RDN in the JNDI layer
o Use the normalized value when injecting a RDN in the entry

Modified:
    directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockCursor.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/normalization/NormalizationServiceIT.java
    directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
    directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
    directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
    directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlStoreTest.java

Modified: directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockCursor.java?rev=1133062&r1=1133061&r2=1133062&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockCursor.java
(original)
+++ directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockCursor.java
Tue Jun  7 16:06:16 2011
@@ -24,12 +24,12 @@ import java.util.NoSuchElementException;
 
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.model.cursor.ClosureMonitor;
+import org.apache.directory.shared.ldap.model.cursor.Cursor;
 import org.apache.directory.shared.ldap.model.cursor.CursorIterator;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.util.exception.NotImplementedException;
-import org.apache.directory.shared.ldap.model.cursor.Cursor;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
+import org.apache.directory.shared.util.exception.NotImplementedException;
 
 public class MockCursor implements Cursor<Entry>
 {

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java?rev=1133062&r1=1133061&r2=1133062&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java
Tue Jun  7 16:06:16 2011
@@ -167,8 +167,8 @@ public class AddIT extends AbstractLdapT
         Attributes entry = LdifUtils.createJndiAttributes( 
             "ObjectClass: top",
             "ObjectClass: inetorgperson",
-            "cn: John\\+Doe",
-            "sn: \\+Name\\+" );
+            "cn: John+Doe",
+            "sn: +Name+" );
         
         LdapContext sysRoot = getSystemContext( getService() );
         DirContext dc = sysRoot.createSubcontext( "cn=John\\+Doe", entry );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/normalization/NormalizationServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/normalization/NormalizationServiceIT.java?rev=1133062&r1=1133061&r2=1133062&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/normalization/NormalizationServiceIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/normalization/NormalizationServiceIT.java
Tue Jun  7 16:06:16 2011
@@ -72,7 +72,7 @@ ou: corporate category\, operations
         sysRoot.createSubcontext( "ou=direct report view", attrs );
 
         attrs = new BasicAttributes( "objectClass", "organizationalUnit", true );
-        attrs.put( "ou", "corporate category\\, operations" );
+        attrs.put( "ou", "corporate category, operations" );
         sysRoot.createSubcontext( "ou=corporate category\\, operations,ou=direct report view",
attrs );
 
         attrs = sysRoot.getAttributes( "ou=corporate category\\, operations,ou=direct report
view" );

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java?rev=1133062&r1=1133061&r2=1133062&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
(original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
Tue Jun  7 16:06:16 2011
@@ -24,7 +24,6 @@ import java.io.Serializable;
 import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.Hashtable;
-import java.util.Iterator;
 import java.util.List;
 
 import javax.naming.Name;
@@ -73,7 +72,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.filter.SimpleNode;
 import org.apache.directory.shared.ldap.model.message.AliasDerefMode;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
-import org.apache.directory.shared.ldap.model.name.Ava;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.name.Rdn;
 import org.apache.directory.shared.ldap.util.JndiUtils;
@@ -570,43 +568,6 @@ public abstract class ServerDirContext e
         attrs = AttributeUtils.toCaseInsensitive( attrs );
         Attributes attributes = ( Attributes ) attrs.clone();
 
-        if ( rdn.size() == 1 )
-        {
-            String rdnAttribute = rdn.getUpType();
-            String rdnValue = rdn.getUpValue().getString();
-
-            // Add the Rdn attribute
-            boolean doRdnPut = attributes.get( rdnAttribute ) == null;
-            doRdnPut = doRdnPut || attributes.get( rdnAttribute ).size() == 0;
-
-            // TODO Fix DIRSERVER-832
-            doRdnPut = doRdnPut || !attributes.get( rdnAttribute ).contains( rdnValue );
-
-            if ( doRdnPut )
-            {
-                attributes.put( rdnAttribute, rdnValue );
-            }
-        }
-        else
-        {
-            for ( Iterator<Ava> ii = rdn.iterator(); ii.hasNext(); /**/)
-            {
-                Ava atav = ii.next();
-
-                // Add the Rdn attribute
-                boolean doRdnPut = attributes.get( atav.getNormType() ) == null;
-                doRdnPut = doRdnPut || attributes.get( atav.getNormType() ).size() == 0;
-
-                // TODO Fix DIRSERVER-832
-                doRdnPut = doRdnPut || !attributes.get( atav.getNormType() ).contains( atav.getNormValue()
);
-
-                if ( doRdnPut )
-                {
-                    attributes.put( atav.getNormType(), atav.getUpValue().getValue() );
-                }
-            }
-        }
-
         // Add the new context to the server which as a side effect adds
         try
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java?rev=1133062&r1=1133061&r2=1133062&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
Tue Jun  7 16:06:16 2011
@@ -425,7 +425,7 @@ public class NormalizationInterceptor ex
                 // 1) The attribute does not exist
                 if ( !entry.containsAttribute( upId ) )
                 {
-                    entry.add( upId, upValue );
+                    entry.add( upId, value );
                 }
                 // 2) The attribute exists
                 else
@@ -436,12 +436,12 @@ public class NormalizationInterceptor ex
                     if ( at.isSingleValued() )
                     {
                         entry.removeAttributes( upId );
-                        entry.add( upId, upValue );
+                        entry.add( upId, value );
                     }
                     // 2.2 the attribute is multi-valued : add the missing value
                     else
                     {
-                        entry.add( upId, upValue );
+                        entry.add( upId, value );
                     }
                 }
             }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java?rev=1133062&r1=1133061&r2=1133062&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
Tue Jun  7 16:06:16 2011
@@ -973,7 +973,7 @@ public class SchemaInterceptor extends B
 
             if ( !entry.contains( type, atav.getNormValue() ) )
             {
-                entry.add( new DefaultAttribute( type, atav.getUpValue() ) );
+                entry.add( new DefaultAttribute( type, atav.getNormValue() ) );
             }
         }
 

Modified: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java?rev=1133062&r1=1133061&r2=1133062&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
(original)
+++ directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
Tue Jun  7 16:06:16 2011
@@ -46,11 +46,11 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.csn.CsnFactory;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
-import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultAttribute;
+import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.DefaultModification;
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.exception.LdapNoSuchObjectException;
@@ -747,7 +747,7 @@ public class JdbmStoreTest
         Long id = store.getEntryId( dn2 );
         assertNotNull( id );
         Entry entry2 = store.lookup( id );
-        assertEquals( "Ja+es", entry2.get( "sn" ).getString() );
+        assertEquals( "ja+es", entry2.get( "sn" ).getString() );
     }
 
 

Modified: directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java?rev=1133062&r1=1133061&r2=1133062&view=diff
==============================================================================
--- directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java
(original)
+++ directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java
Tue Jun  7 16:06:16 2011
@@ -507,7 +507,7 @@ public class LdifPartitionTest
         // the renamed LDIF must contain the old an new Rdn attribute
         String content = FileUtils.readFileToString( new File( wkdir, "ou=test,ou=system/dc=renamedchild1.ldif"
) );
         assertTrue( content.contains( "dc: child1" ) );
-        assertTrue( content.contains( "dc: renamedChild1" ) );
+        assertTrue( content.contains( "dc: renamedchild1" ) );
     }
 
 
@@ -573,7 +573,7 @@ public class LdifPartitionTest
         String content = FileUtils
             .readFileToString( new File( wkdir, "ou=test,ou=system/dc=child2/dc=movedchild1.ldif"
) );
         assertTrue( content.contains( "dc: child1" ) );
-        assertTrue( content.contains( "dc: movedChild1" ) );
+        assertTrue( content.contains( "dc: movedchild1" ) );
     }
 
 

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java?rev=1133062&r1=1133061&r2=1133062&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
Tue Jun  7 16:06:16 2011
@@ -903,9 +903,11 @@ public class AddIT extends AbstractLdapT
         attrs.get( "objectClass" ).add( "person" );
         attrs.put( "givenName", "Jim" );
         attrs.put( "sn", "Bean" );
-        attrs.put( "cn", "\"Jim, Bean\"" );
+        attrs.put( "cn", "Jim, Bean" );
 
-        ctx.createSubcontext( "cn=\"Jim, Bean\"", attrs );
+        DirContext jimBeanCtx = ctx.createSubcontext( "cn=\"Jim, Bean\"", attrs );
+        
+        assertNotNull( jimBeanCtx );
     }
 
 
@@ -985,7 +987,7 @@ public class AddIT extends AbstractLdapT
 
         assertEquals( 2, cn.size() );
         String[] expectedCns =
-            { "Jackson", "Michael" };
+            { "Jackson", "michael" };
 
         for ( String name : expectedCns )
         {
@@ -1080,7 +1082,7 @@ public class AddIT extends AbstractLdapT
 
         assertEquals( 2, cn.size() );
         assertTrue( cn.contains( "Jackson" ) );
-        assertTrue( cn.contains( "Michael" ) );
+        assertTrue( cn.contains( "michael" ) );
     }
 
 
@@ -1215,7 +1217,8 @@ public class AddIT extends AbstractLdapT
         toriOC.add( "top" );
         toriOC.add( "person" );
         tori.put( toriOC );
-        tori.put( "cn", "Tori Amos" );
+        //tori.put( "cn", "Amos,Tori" );
+        tori.put( "cn", "Tori,Amos" );
         tori.put( "sn", "Amos" );
         /*
          * Note that the Rdn attribute is different to the cn specified in the entry.
@@ -1250,8 +1253,8 @@ public class AddIT extends AbstractLdapT
         assertTrue( res.hasMore() );
         javax.naming.directory.Attribute cnAttribute = res.next().getAttributes().get( "cn"
);
         assertEquals( 2, cnAttribute.size() );
-        assertTrue( cnAttribute.contains( "Tori Amos" ) );
-        assertTrue( cnAttribute.contains( "Amos,Tori" ) );
+        assertTrue( cnAttribute.contains( "Tori,Amos" ) );
+        assertTrue( cnAttribute.contains( "amos,tori" ) );
         assertFalse( res.hasMore() );
 
         // search for the implicit added userPassword

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java?rev=1133062&r1=1133061&r2=1133062&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java
Tue Jun  7 16:06:16 2011
@@ -21,6 +21,7 @@ package org.apache.directory.server.oper
 
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
@@ -371,6 +372,7 @@ public class AddingEntriesWithSpecialCha
     public void testAddRdnWithEscapedSpaces() throws Exception 
     {
         LdapConnection connection = ServerIntegrationUtils.getClientApiConnection( getLdapServer()
);
+        connection.setTimeOut( -1 );
 
         Entry entry = new DefaultEntry( 
             "cn=\\ User, ou=system",
@@ -378,8 +380,8 @@ public class AddingEntriesWithSpecialCha
             "objectClass: person",
             "objectClass: organizationalPerson",
             "objectClass: inetOrgPerson", 
-            "cn: \\ User",
-            "sn: \\ Name\\ " );
+            "cn:  User",
+            "sn:  Name " );
 
         connection.add( entry );
         
@@ -387,7 +389,10 @@ public class AddingEntriesWithSpecialCha
         
         assertNotNull( addedEntry );
         
-        assertEquals( "\\ Name\\ ", addedEntry.get( "sn" ).getString() );
-        assertEquals( "\\ User", addedEntry.get( "cn" ).getString() );
+        assertEquals( "Name", addedEntry.get( "sn" ).getString() );
+        assertEquals( "User", addedEntry.get( "cn" ).getString() );
+        assertEquals( 1, addedEntry.get( "cn" ).size() );
+        assertTrue( addedEntry.contains( "cn", "User" ) );
+        assertFalse( addedEntry.contains( "cn", " User" ) );
       } 
 }
\ No newline at end of file

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java?rev=1133062&r1=1133061&r2=1133062&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java
Tue Jun  7 16:06:16 2011
@@ -43,6 +43,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.model.ldif.LdifUtils;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -134,7 +135,7 @@ public class ModifyRdnIT extends Abstrac
 
         // Check values of cn
         Attribute cn = tori.getAttributes( "" ).get( "cn" );
-        assertTrue( cn.contains( newCn ) );
+        assertTrue( cn.contains( Strings.toLowerCase( newCn ) ) );
         assertTrue( !cn.contains( oldCn ) ); // old value is gone
         assertEquals( 1, cn.size() );
 
@@ -183,7 +184,7 @@ public class ModifyRdnIT extends Abstrac
 
         // Check values of cn
         Attribute cn = tori.getAttributes( "" ).get( "cn" );
-        assertTrue( cn.contains( newCn ) );
+        assertTrue( cn.contains( Strings.toLowerCase( newCn ) ) );
         assertTrue( cn.contains( oldCn ) ); // old value is still there
         assertEquals( 2, cn.size() );
 
@@ -230,7 +231,7 @@ public class ModifyRdnIT extends Abstrac
 
         // Check values of cn
         Attribute cn = tori.getAttributes( "" ).get( "cn" );
-        assertTrue( cn.contains( newCn ) );
+        assertTrue( cn.contains( Strings.toLowerCase( newCn ) ) );
         assertTrue( cn.contains( oldCn ) ); // old value is still there
         assertEquals( 2, cn.size() );
 
@@ -285,7 +286,7 @@ public class ModifyRdnIT extends Abstrac
 
         // Check values of cn
         cn = tori.getAttributes( "" ).get( "cn" );
-        assertTrue( cn.contains( newCn ) );
+        assertTrue( cn.contains( Strings.toLowerCase( newCn ) ) );
         assertTrue( !cn.contains( oldCn ) ); // old value is gone
         assertTrue( cn.contains( alternateCn ) ); // alternate value is still available
         assertEquals( 2, cn.size() );
@@ -424,7 +425,7 @@ public class ModifyRdnIT extends Abstrac
 
         // Check values of ou
         Attribute ou = org.getAttributes( "" ).get( "ou" );
-        assertTrue( ou.contains( newOu ) );
+        assertTrue( ou.contains( Strings.toLowerCase( newOu ) ) );
         assertTrue( !ou.contains( oldOu ) ); // old value is gone
         assertEquals( 1, ou.size() );
 

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java?rev=1133062&r1=1133061&r2=1133062&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
Tue Jun  7 16:06:16 2011
@@ -36,8 +36,8 @@ import org.apache.directory.server.i18n.
 import org.apache.directory.shared.asn1.util.Oid;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
-import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.Attribute;
+import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.entry.Value;
@@ -1199,7 +1199,7 @@ public abstract class AbstractStore<E, I
 
             AttributeType newRdnAttrType = schemaManager.lookupAttributeTypeRegistry( newNormType
);
 
-            entry.add( newRdnAttrType, newAtav.getUpValue() );
+            entry.add( newRdnAttrType, newAtav.getNormValue() );
 
             if ( hasUserIndexOn( newNormType ) )
             {

Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlStoreTest.java?rev=1133062&r1=1133061&r2=1133062&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlStoreTest.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlStoreTest.java
Tue Jun  7 16:06:16 2011
@@ -46,11 +46,11 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.csn.CsnFactory;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
-import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultAttribute;
+import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.DefaultModification;
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.exception.LdapNoSuchObjectException;
@@ -649,7 +649,7 @@ public class AvlStoreTest
         Long id = store.getEntryId( dn2 );
         assertNotNull( id );
         Entry entry2 = store.lookup( id );
-        assertEquals( "Ja+es", entry2.get( "sn" ).getString() );
+        assertEquals( "ja+es", entry2.get( "sn" ).getString() );
     }
 
 



Mime
View raw message