directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1422719 - in /directory/apacheds/trunk: core-api/src/main/java/org/apache/directory/server/core/api/sp/ core-integ/src/test/java/org/apache/directory/server/core/authz/ core-integ/src/test/java/org/apache/directory/server/core/operations/s...
Date Mon, 17 Dec 2012 00:03:44 GMT
Author: elecharny
Date: Mon Dec 17 00:03:43 2012
New Revision: 1422719

URL: http://svn.apache.org/viewvc?rev=1422719&view=rev
Log:
The search() operation does not need a null parameter when there no attributes to return are
given

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/sp/LdapClassLoader.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/AliasSearchIT.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/StoreUtils.java
    directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java
    directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/catalog/GetCatalog.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/sp/LdapClassLoader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/sp/LdapClassLoader.java?rev=1422719&r1=1422718&r2=1422719&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/sp/LdapClassLoader.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/sp/LdapClassLoader.java
Mon Dec 17 00:03:43 2012
@@ -97,7 +97,7 @@ public class LdapClassLoader extends Cla
                 try
                 {
                     cursor = directoryService.getAdminSession()
-                        .search( base, SearchScope.SUBTREE, filter, AliasDerefMode.DEREF_ALWAYS,
null );
+                        .search( base, SearchScope.SUBTREE, filter, AliasDerefMode.DEREF_ALWAYS
);
 
                     cursor.beforeFirst();
                     if ( cursor.next() ) // there should be only one!

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java?rev=1422719&r1=1422718&r2=1422719&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java
Mon Dec 17 00:03:43 2012
@@ -173,7 +173,7 @@ public class AuthorizationServiceAsNonAd
             CoreSession akarasuluSession = getService().getSession( principal );
 
             ExprNode filter = FilterParser.parse( getService().getSchemaManager(), "(objectClass=*)"
);
-            EntryFilteringCursor cursor = akarasuluSession.search( new Dn( "ou=users,ou=system"
), SearchScope.OBJECT, filter , AliasDerefMode.DEREF_ALWAYS, null );
+            EntryFilteringCursor cursor = akarasuluSession.search( new Dn( "ou=users,ou=system"
), SearchScope.OBJECT, filter , AliasDerefMode.DEREF_ALWAYS );
             
             while ( cursor.next() )
             {

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/AliasSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/AliasSearchIT.java?rev=1422719&r1=1422718&r2=1422719&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/AliasSearchIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/AliasSearchIT.java
Mon Dec 17 00:03:43 2012
@@ -442,7 +442,7 @@ public class AliasSearchIT extends Abstr
             ExprNode exprNode = FilterParser.parse( getService().getSchemaManager(), "(objectClass=*)"
);
             AliasDerefMode aliasDerefMode = AliasDerefMode.DEREF_ALWAYS;
             EntryFilteringCursor cursor = getService().getAdminSession()
-                .search( base, scope, exprNode, aliasDerefMode, null );
+                .search( base, scope, exprNode, aliasDerefMode );
 
             // advancing the cursor forward and backward must give the same result
             for ( int count = 1; count < 20; count++ )
@@ -489,7 +489,7 @@ public class AliasSearchIT extends Abstr
             ExprNode exprNode = FilterParser.parse( getService().getSchemaManager(), "(objectClass=*)"
);
             AliasDerefMode aliasDerefMode = AliasDerefMode.DEREF_ALWAYS;
             EntryFilteringCursor cursor = getService().getAdminSession()
-                .search( base, scope, exprNode, aliasDerefMode, null );
+                .search( base, scope, exprNode, aliasDerefMode );
 
             // advancing the cursor backward and forward must give the same result
             for ( int count = 1; count < 20; count++ )
@@ -584,7 +584,7 @@ public class AliasSearchIT extends Abstr
 
         ExprNode exprNode = FilterParser.parse( getService().getSchemaManager(), filter );
         EntryFilteringCursor cursor = getService().getAdminSession().search( new Dn( base
), scope, exprNode,
-            aliasDerefMode, null );
+            aliasDerefMode );
         cursor.beforeFirst();
 
         while ( cursor.next() )

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/StoreUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/StoreUtils.java?rev=1422719&r1=1422718&r2=1422719&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/StoreUtils.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/StoreUtils.java
Mon Dec 17 00:03:43 2012
@@ -131,7 +131,7 @@ public class StoreUtils
         {
             SchemaManager schemaManager = session.getDirectoryService().getSchemaManager();
             cursor = session.search( searchBaseDn, SearchScope.SUBTREE,
-                getFilter( schemaManager, principal ), AliasDerefMode.DEREF_ALWAYS, null
);
+                getFilter( schemaManager, principal ), AliasDerefMode.DEREF_ALWAYS );
 
             cursor.beforeFirst();
             if ( cursor.next() )

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java?rev=1422719&r1=1422718&r2=1422719&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java
(original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java
Mon Dec 17 00:03:43 2012
@@ -36,6 +36,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.shared.client.api.LdapApiIntegrationUtils;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
 import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
+import org.apache.directory.shared.ldap.model.cursor.SearchCursor;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.message.AliasDerefMode;
 import org.apache.directory.shared.ldap.model.message.Response;
@@ -43,6 +44,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.SearchRequest;
 import org.apache.directory.shared.ldap.model.message.SearchRequestImpl;
 import org.apache.directory.shared.ldap.model.message.SearchResultDone;
+import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.apache.directory.shared.ldap.model.message.controls.ManageDsaITImpl;
 import org.apache.directory.shared.ldap.model.name.Dn;
@@ -132,13 +134,20 @@ public class ClientSearchRequestTest ext
         SearchRequest searchRequest = new SearchRequestImpl().setBase( new Dn( "ou=system"
) )
             .setFilter( "(objectclass=*)" )
             .setScope( SearchScope.ONELEVEL ).addControl( new ManageDsaITImpl() );
-        EntryCursor cursor = connection.search( "ou=system", "(objectclass=*)", SearchScope.ONELEVEL
);
+        SearchCursor cursor = connection.search( searchRequest );
         int count = 0;
     
         while ( cursor.next() )
         {
-            Entry entry = cursor.get();
-            assertNotNull( entry );
+            Response response = cursor.get();
+            assertNotNull( response );
+            
+            if ( response instanceof SearchResultEntry )
+            {
+                Entry entry = ((SearchResultEntry)response).getEntry();
+                assertNotNull( entry );
+            }
+            
             count++;
         }
     

Modified: directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/catalog/GetCatalog.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/catalog/GetCatalog.java?rev=1422719&r1=1422718&r2=1422719&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/catalog/GetCatalog.java
(original)
+++ directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/catalog/GetCatalog.java
Mon Dec 17 00:03:43 2012
@@ -54,8 +54,7 @@ public class GetCatalog implements Direc
             Dn.ROOT_DSE,
             SearchScope.SUBTREE,
             FilterParser.parse( session.getDirectoryService().getSchemaManager(), filter
),
-            AliasDerefMode.DEREF_ALWAYS,
-            null );
+            AliasDerefMode.DEREF_ALWAYS );
 
         Map<String, String> catalog = new HashMap<String, String>();
 



Mime
View raw message