directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r291607 - in /directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support: MostSpecificProtectedItemFilter.java MostSpecificUserClassFilter.java
Date Mon, 26 Sep 2005 12:18:57 GMT
Author: trustin
Date: Mon Sep 26 05:18:53 2005
New Revision: 291607

URL: http://svn.apache.org/viewcvs?rev=291607&view=rev
Log:
Removed duplicate code in MostSpecificProtectedItemFilter after the removal of unnecessary
assertion code.

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MostSpecificProtectedItemFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MostSpecificUserClassFilter.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MostSpecificProtectedItemFilter.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MostSpecificProtectedItemFilter.java?rev=291607&r1=291606&r2=291607&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MostSpecificProtectedItemFilter.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MostSpecificProtectedItemFilter.java
Mon Sep 26 05:18:53 2005
@@ -50,22 +50,10 @@
             for( Iterator j = tuple.getProtectedItems().iterator(); j.hasNext(); )
             {
                 ProtectedItem item = ( ProtectedItem ) j.next();
-                if( item instanceof ProtectedItem.AttributeType )
-                {
-                    filteredTuples.add( tuple );
-                    break;
-                }
-                else if( item instanceof ProtectedItem.AllAttributeValues )
-                {
-                    filteredTuples.add( tuple );
-                    break;
-                }
-                else if( item instanceof ProtectedItem.SelfValue )
-                {
-                    filteredTuples.add( tuple );
-                    break;
-                }
-                else if( item instanceof ProtectedItem.AttributeValue )
+                if( item instanceof ProtectedItem.AttributeType ||
+                    item instanceof ProtectedItem.AllAttributeValues ||
+                    item instanceof ProtectedItem.SelfValue ||
+                    item instanceof ProtectedItem.AttributeValue )
                 {
                     filteredTuples.add( tuple );
                     break;

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MostSpecificUserClassFilter.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MostSpecificUserClassFilter.java?rev=291607&r1=291606&r2=291607&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MostSpecificUserClassFilter.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MostSpecificUserClassFilter.java
Mon Sep 26 05:18:53 2005
@@ -51,7 +51,7 @@
             {
                 UserClass userClass = ( UserClass ) j.next();
                 if( userClass instanceof UserClass.Name ||
-                        userClass instanceof UserClass.ThisEntry )
+                    userClass instanceof UserClass.ThisEntry )
                 {
                     filteredTuples.add( tuple );
                     break;



Mime
View raw message