directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1059931 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
Date Mon, 17 Jan 2011 14:17:20 GMT
Author: elecharny
Date: Mon Jan 17 14:17:20 2011
New Revision: 1059931

URL: http://svn.apache.org/viewvc?rev=1059931&view=rev
Log:
Simplified the getMemberAttribute method 

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=1059931&r1=1059930&r2=1059931&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 Jan 17 14:17:20 2011
@@ -204,36 +204,18 @@ public class GroupCache
      */
     private EntryAttribute getMemberAttribute( Entry entry ) throws LdapException
     {
-        EntryAttribute oc = entry.get( OBJECT_CLASS_AT );
+        EntryAttribute member = entry.get( MEMBER_AT );
 
-        if ( oc == null )
+        if ( member != null )
         {
-            EntryAttribute member = entry.get( MEMBER_AT );
-
-            if ( member != null )
-            {
-                return member;
-            }
-
-            EntryAttribute uniqueMember = entry.get( UNIQUE_MEMBER_AT );
-
-            if ( uniqueMember != null )
-            {
-                return uniqueMember;
-            }
-
-            return null;
+            return member;
         }
 
-        if ( oc.contains( SchemaConstants.GROUP_OF_NAMES_OC ) || oc.contains( SchemaConstants.GROUP_OF_NAMES_OC_OID
) )
-        {
-            return entry.get( MEMBER_AT );
-        }
+        EntryAttribute uniqueMember = entry.get( UNIQUE_MEMBER_AT );
 
-        if ( oc.contains( SchemaConstants.GROUP_OF_UNIQUE_NAMES_OC )
-            || oc.contains( SchemaConstants.GROUP_OF_UNIQUE_NAMES_OC_OID ) )
+        if ( uniqueMember != null )
         {
-            return entry.get( UNIQUE_MEMBER_AT );
+            return uniqueMember;
         }
 
         return null;



Mime
View raw message