From db4a0e0b9584ca69724f0492ad9e091aa02d01fc Mon Sep 17 00:00:00 2001
From: davidely <davidely@localhost>
Date: Sun, 02 Sep 2007 04:00:42 +0000
Subject: [PATCH] There are several improvements to the unit test framework in this commit.

---
 opendj-sdk/opends/src/server/org/opends/server/authorization/dseecompat/AciHandler.java |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/authorization/dseecompat/AciHandler.java b/opendj-sdk/opends/src/server/org/opends/server/authorization/dseecompat/AciHandler.java
index 306fa63..6d76f6f 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/authorization/dseecompat/AciHandler.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/authorization/dseecompat/AciHandler.java
@@ -134,6 +134,13 @@
    public static final String ALL_OP_ATTRS_MATCHED = "allOpAttrsMatched";
 
    static {
+     initStatics();
+   }
+
+  // We initialize these for each new AciHandler so that we can clear out
+  // the stale references that can occur during an in-core restart.
+  private static void initStatics()
+  {
     if((aciType = DirectoryServer.getAttributeType("aci")) == null)
     {
       aciType = DirectoryServer.getDefaultAttributeType("aci");
@@ -167,7 +174,7 @@
      } catch (DirectoryException ex) {
        //Should never happen.
      }
-   }
+  }
 
   /**
    * Creates a new DSEE-compatible access control handler.
@@ -188,6 +195,7 @@
                    DseeCompatAccessControlHandlerCfg configuration)
          throws ConfigException, InitializationException
   {
+    initStatics();
     DN configurationDN=configuration.dn();
     aciList = new AciList(configurationDN);
     aciListenerMgr = new AciListenerManager(aciList, configurationDN);
@@ -203,7 +211,7 @@
   @Override()
   public void finalizeAccessControlHandler()
   {
-    // No implementation required.
+    AciEffectiveRights.finalizeOnShutdown();
   }
 
 

--
Gitblit v1.10.0