You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2006/06/07 06:52:45 UTC
svn commit: r412290 -
/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java
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" );