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 2008/05/25 04:37:31 UTC
svn commit: r659897 - in
/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core:
interceptor/context/SearchingOperationContext.java
schema/SchemaInterceptor.java
Author: akarasulu
Date: Sat May 24 19:37:30 2008
New Revision: 659897
URL: http://svn.apache.org/viewvc?rev=659897&view=rev
Log:
properly deal with setting the returning attributes
Modified:
directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/SearchingOperationContext.java
directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/SearchingOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/SearchingOperationContext.java?rev=659897&r1=659896&r2=659897&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/SearchingOperationContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/SearchingOperationContext.java Sat May 24 19:37:30 2008
@@ -375,7 +375,11 @@
}
}
- controls.setReturningAttributes( allReturningAttributes.toArray( ArrayUtils.EMPTY_STRING_ARRAY ) );
+ if ( allReturningAttributes.size() > 0 )
+ {
+ controls.setReturningAttributes( allReturningAttributes.toArray( ArrayUtils.EMPTY_STRING_ARRAY ) );
+ }
+
return controls;
}
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java?rev=659897&r1=659896&r2=659897&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java Sat May 24 19:37:30 2008
@@ -666,7 +666,10 @@
// We have to eliminate bad attributes from the request, accordingly
// to RFC 2251, chap. 4.5.1. Basically, all unknown attributes are removed
// from the list
- filterAttributesToReturn( searchCtls );
+ if ( searchCtls.getReturningAttributes() != null )
+ {
+ filterAttributesToReturn( searchCtls );
+ }
// We also have to check the H/R flag for the filter attributes
checkFilter( filter );
@@ -689,7 +692,7 @@
cursor.addEntryFilter( ef );
}
- return null;
+ return cursor;
}
// The user was searching into the subSchemaSubEntry