From 56e752193bfb90d11cfe73c35a24e576b9b18c87 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 03 Jul 2013 11:03:06 +0000
Subject: [PATCH] First stab at having debuggable ACIs.

---
 opends/src/server/org/opends/server/authorization/dseecompat/AciList.java |   33 +++++++++++++++------------------
 1 files changed, 15 insertions(+), 18 deletions(-)

diff --git a/opends/src/server/org/opends/server/authorization/dseecompat/AciList.java b/opends/src/server/org/opends/server/authorization/dseecompat/AciList.java
index 0674f03..b6f78f2 100644
--- a/opends/src/server/org/opends/server/authorization/dseecompat/AciList.java
+++ b/opends/src/server/org/opends/server/authorization/dseecompat/AciList.java
@@ -23,43 +23,42 @@
  *
  *
  *      Copyright 2008-2010 Sun Microsystems, Inc.
+ *      Portions Copyright 2013 ForgeRock AS
  */
-
 package org.opends.server.authorization.dseecompat;
-import org.opends.messages.Message;
 
-import org.opends.server.api.Backend;
-import static org.opends.server.authorization.dseecompat.AciHandler.*;
-import static org.opends.server.loggers.ErrorLogger.logError;
 import static org.opends.messages.AccessControlMessages.*;
-import org.opends.server.api.DITCacheMap;
-import org.opends.server.types.*;
+import static org.opends.server.authorization.dseecompat.AciHandler.*;
+import static org.opends.server.loggers.ErrorLogger.*;
 
 import java.util.*;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
+import org.opends.messages.Message;
+import org.opends.server.api.Backend;
+import org.opends.server.api.DITCacheMap;
+import org.opends.server.types.*;
+
 /**
  * The AciList class performs caching of the ACI attribute values
  * using the entry DN as the key.
  */
 public class AciList {
 
-  /*
+  /**
    * A map containing all the ACIs.
    * We use the copy-on-write technique to avoid locking when reading.
    */
   private volatile DITCacheMap<List<Aci>> aciList =
        new DITCacheMap<List<Aci>>();
 
-  /*
+  /**
    * Lock to protect internal data structures.
    */
   private final ReentrantReadWriteLock lock =
           new ReentrantReadWriteLock();
 
-  /*
-  * The configuration DN used to compare against the global ACI entry DN.
-  */
+  /** The configuration DN used to compare against the global ACI entry DN. */
   private DN configDN;
 
   /**
@@ -102,12 +101,10 @@
               AciTargets targets = aci.getTargets();
               //If there is a target, evaluate it to see if this ACI should
               //be included in the candidate set.
-              if (targets != null) {
-                boolean ret = AciTargets.isTargetApplicable(aci, targets,
-                        entryDN);
-                if (ret) {
+              if (targets != null
+                  && AciTargets.isTargetApplicable(aci, targets, entryDN))
+              {
                   candidates.add(aci);  //Add this ACI to the candidates.
-                }
               }
             }
           } else {
@@ -414,7 +411,7 @@
 
   /**
    * Rename all ACIs under the specified old DN to the new DN. A simple
-   * interation over the entire list is performed.
+   * interaction over the entire list is performed.
    * @param oldDN The DN of the original entry that was moved.
    * @param newDN The DN of the new entry.
    */

--
Gitblit v1.10.0