directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r660400 - /directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
Date Tue, 27 May 2008 06:21:43 GMT
Author: akarasulu
Date: Mon May 26 23:21:37 2008
New Revision: 660400

URL: http://svn.apache.org/viewvc?rev=660400&view=rev
Log:
fixing bug breaking mitosis when it expects a null return from the lookup() operation instead
of throwing a NPE

Modified:
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java?rev=660400&r1=660399&r2=660400&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
Mon May 26 23:21:37 2008
@@ -287,7 +287,14 @@
 
     public ClonedServerEntry lookup( LookupOperationContext opContext ) throws Exception
     {
-        ClonedServerEntry entry = lookup( getEntryId( opContext.getDn().getNormName() ) );
+        Long id = getEntryId( opContext.getDn().getNormName() );
+        
+        if ( id == null )
+        {
+            return null;
+        }
+        
+        ClonedServerEntry entry = lookup( id );
 
         if ( ( opContext.getAttrsId() == null ) || ( opContext.getAttrsId().size() == 0 )
)
         {



Mime
View raw message