You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ka...@apache.org on 2010/05/31 12:15:34 UTC
svn commit: r949704 -
/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
Author: kayyagari
Date: Mon May 31 10:15:34 2010
New Revision: 949704
URL: http://svn.apache.org/viewvc?rev=949704&view=rev
Log:
fix for DIRSERVER-1121
Modified:
directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java?rev=949704&r1=949703&r2=949704&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java Mon May 31 10:15:34 2010
@@ -125,16 +125,19 @@ public class GroupCache
// search all naming contexts for static groups and generate
// normalized sets of members to cache within the map
- BranchNode filter = new OrNode();
- filter.addNode( new EqualityNode<String>( SchemaConstants.OBJECT_CLASS_AT, new StringValue(
- SchemaConstants.GROUP_OF_NAMES_OC ) ) );
- filter.addNode( new EqualityNode<String>( SchemaConstants.OBJECT_CLASS_AT, new StringValue(
- SchemaConstants.GROUP_OF_UNIQUE_NAMES_OC ) ) );
-
Set<String> suffixes = nexus.listSuffixes( null );
for ( String suffix:suffixes )
{
+ // moving the filter creation to inside loop to fix DIRSERVER-1121
+ // didn't use clone() cause it is creating List objects, which IMO is not worth calling
+ // in this initialization phase
+ BranchNode filter = new OrNode();
+ filter.addNode( new EqualityNode<String>( SchemaConstants.OBJECT_CLASS_AT, new StringValue(
+ SchemaConstants.GROUP_OF_NAMES_OC ) ) );
+ filter.addNode( new EqualityNode<String>( SchemaConstants.OBJECT_CLASS_AT, new StringValue(
+ SchemaConstants.GROUP_OF_UNIQUE_NAMES_OC ) ) );
+
DN baseDn = new DN( suffix ).normalize( normalizerMap );
SearchControls ctls = new SearchControls();
ctls.setSearchScope( SearchControls.SUBTREE_SCOPE );