directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r412290 - /directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java
Date Wed, 07 Jun 2006 04:52:45 GMT
Author: akarasulu
Date: Tue Jun  6 21:52:44 2006
New Revision: 412290

URL: http://svn.apache.org/viewvc?rev=412290&view=rev
Log:
fixing issues with getPrefix() usage

Modified:
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java?rev=412290&r1=412289&r2=412290&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java
(original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java
Tue Jun  6 21:52:44 2006
@@ -742,19 +742,22 @@
         // entry sequences start at 1.
         //
 
+        LdapDN parentDn = null;
         if ( normName.equals( normSuffix ) )
         {
             parentId = BigInteger.ZERO;
         }
         else
         {
-            parentId = getEntryId( normName.getPrefix( 1 ).toString() );
+            parentDn = ( LdapDN ) normName.clone();
+            parentDn.remove( parentDn.size() - 1 );
+            parentId = getEntryId( parentDn.toString() );
         }
 
         // don't keep going if we cannot find the parent Id
         if ( parentId == null )
         {
-            throw new LdapNameNotFoundException( "Id for parent '" + normName.getPrefix(
1 ).toString() + "' not found!" );
+            throw new LdapNameNotFoundException( "Id for parent '" + parentDn + "' not found!"
);
         }
 
         Attribute objectClass = entry.get( "objectClass" );



Mime
View raw message