directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r519578 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java
Date Sun, 18 Mar 2007 09:18:14 GMT
Author: elecharny
Date: Sun Mar 18 02:18:13 2007
New Revision: 519578

URL: http://svn.apache.org/viewvc?view=rev&rev=519578
Log:
Replaced a direct comparizon of an attribute value by a call to the helper method which deal
with
casing

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java?view=diff&rev=519578&r1=519577&r2=519578
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java
Sun Mar 18 02:18:13 2007
@@ -30,6 +30,7 @@
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.util.AttributeUtils;
 
 /**
  * A utility class for working with Triggers Execution Administrative Points
@@ -52,7 +53,8 @@
     {
         Attributes ap = apCtx.getAttributes( "", new String[] { ADMINISTRATIVE_ROLE_ATTR
} );
         Attribute administrativeRole = ap.get( ADMINISTRATIVE_ROLE_ATTR );
-        if ( administrativeRole == null || !administrativeRole.contains( TRIGGER_EXECUTION_SPECIFIC_AREA_ATTR_VALUE
) )
+        if ( administrativeRole == null || 
+            !AttributeUtils.containsValueCaseIgnore( administrativeRole, TRIGGER_EXECUTION_SPECIFIC_AREA_ATTR_VALUE
) )
         {
             Attributes changes = new AttributesImpl( ADMINISTRATIVE_ROLE_ATTR, TRIGGER_EXECUTION_SPECIFIC_AREA_ATTR_VALUE,
true );
             apCtx.modifyAttributes( "", DirContext.ADD_ATTRIBUTE, changes );



Mime
View raw message