directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r895686 - /directory/apacheds/branches/apacheds-schema/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
Date Mon, 04 Jan 2010 16:39:06 GMT
Author: seelmann
Date: Mon Jan  4 16:38:59 2010
New Revision: 895686

URL: http://svn.apache.org/viewvc?rev=895686&view=rev
Log:
Fixed the rename operation, values in RDN are already unescaped

Modified:
    directory/apacheds/branches/apacheds-schema/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java

Modified: directory/apacheds/branches/apacheds-schema/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java?rev=895686&r1=895685&r2=895686&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
(original)
+++ directory/apacheds/branches/apacheds-schema/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
Mon Jan  4 16:38:59 2010
@@ -39,9 +39,7 @@
 import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.entry.ServerAttribute;
-import org.apache.directory.server.core.entry.ServerBinaryValue;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.entry.ServerStringValue;
 import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.xdbm.IndexCursor;
 import org.apache.directory.server.xdbm.IndexEntry;
@@ -1768,25 +1766,10 @@
         for ( AVA newAtav : newRdn )
         {
             String newNormType = newAtav.getNormType();
-            String newNormValue = newAtav.getNormValue().getString();
+            Object newNormValue = newAtav.getNormValue().get();
             AttributeType newRdnAttrType = schemaManager.lookupAttributeTypeRegistry( newNormType
);
             
-            Object unEscapedRdn = Rdn.unescapeValue( newAtav.getUpValue().getString() );
-            
-            Value<?> value = null;
-            
-            if ( unEscapedRdn instanceof String )
-            {
-                value = new ServerStringValue( newRdnAttrType, (String)unEscapedRdn );
-            }
-            else
-            {
-                value = new ServerBinaryValue( newRdnAttrType, (byte[])unEscapedRdn );
-            }
-            
-            value.normalize();
-            
-            entry.add( newRdnAttrType, value );
+            entry.add( newRdnAttrType, newAtav.getUpValue() );
 
             if ( hasUserIndexOn( newNormType ) )
             {



Mime
View raw message