directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r989681 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Date Thu, 26 Aug 2010 13:36:00 GMT
Author: kayyagari
Date: Thu Aug 26 13:35:59 2010
New Revision: 989681

URL: http://svn.apache.org/viewvc?rev=989681&view=rev
Log:
o fixed an issue while searching on RootDSE with one level scope (when the partition's context
entry is not present the search is not returning correct results)

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=989681&r1=989680&r2=989681&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Thu Aug 26 13:35:59 2010
@@ -847,9 +847,15 @@ public class DefaultPartitionNexus exten
 
                 for ( Partition partition : partitions.values() )
                 {
-                    searchContext.setDn( partition.getSuffix() );
-                    searchContext.setScope( SearchScope.OBJECT );
-                    cursors.add( partition.search( searchContext ) );
+                    DN contextDn = partition.getSuffix();
+                    EntryOperationContext hasEntryContext = new EntryOperationContext( null,
contextDn );
+                    // search only if the context entry exists
+                    if( partition.hasEntry( hasEntryContext ) )
+                    {
+                        searchContext.setDn( contextDn );
+                        searchContext.setScope( SearchScope.OBJECT );
+                        cursors.add( partition.search( searchContext ) );
+                    }
                 }
 
                 return new CursorList( cursors, searchContext );



Mime
View raw message