From 455897cc245b67d929f409a93cfa7106e835cc1f Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Thu, 01 Mar 2007 03:27:06 +0000
Subject: [PATCH] This removes old debug logging framework method calls that are going to be automatically instrumented by AspectJ. Non instrumented debug method calls are updated to use the new debug framework methods. However, the new debug logging framework is not yet active as the Aspects are not weaved in. After this revision, debug logging will be disabled in the server until the new AOP framework is complete. 

---
 opends/src/server/org/opends/server/core/PasswordPolicyConfig.java |   38 +++++++++++++++++++-------------------
 1 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/opends/src/server/org/opends/server/core/PasswordPolicyConfig.java b/opends/src/server/org/opends/server/core/PasswordPolicyConfig.java
index e079456..3651309 100644
--- a/opends/src/server/org/opends/server/core/PasswordPolicyConfig.java
+++ b/opends/src/server/org/opends/server/core/PasswordPolicyConfig.java
@@ -48,7 +48,9 @@
 import org.opends.server.types.ResultCode;
 
 import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
 import static org.opends.server.messages.CoreMessages.*;
 import static org.opends.server.messages.MessageHandler.getMessage;
 import static org.opends.server.util.ServerConstants.*;
@@ -63,11 +65,6 @@
 public class PasswordPolicyConfig
         implements ConfigurableComponent
 {
-  /**
-   * The fully-qualified name of this class for debugging purposes.
-   */
-  private static final String CLASS_NAME =
-       "org.opends.server.core.PasswordPolicyConfig";
 
   /**
    * The password policy object corresponding to the configuration entry. The
@@ -87,7 +84,6 @@
    */
   public PasswordPolicyConfig(PasswordPolicy policy)
   {
-    assert debugConstructor(CLASS_NAME, String.valueOf(policy));
 
     this.currentPolicy = policy;
     DirectoryServer.registerConfigurableComponent(this);
@@ -100,7 +96,6 @@
    */
   public void finalizePasswordPolicyConfig()
   {
-    assert debugEnter(CLASS_NAME, "finalizePasswordPolicyConfig");
 
     DirectoryServer.deregisterConfigurableComponent(this);
   }
@@ -116,7 +111,6 @@
    */
   public DN getConfigurableComponentEntryDN()
   {
-    assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
 
     return currentPolicy.getConfigEntryDN();
   }
@@ -132,7 +126,6 @@
    */
   public List<ConfigAttribute> getConfigurationAttributes()
   {
-    assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
 
 
     // Create a list of units and values that we can use to represent time
@@ -409,8 +402,6 @@
   public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
                                             List<String> unacceptableReasons)
   {
-    assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
-                      String.valueOf(configEntry), "java.util.List<String>");
 
     assert configEntry.getDN().equals(this.currentPolicy.getConfigEntryDN() )
             : "Internal Error: mismatch between DN of configuration entry and"
@@ -422,14 +413,20 @@
     }
     catch (ConfigException ce)
     {
-      assert debugException(CLASS_NAME, "hasAcceptableConfiguration", ce);
+      if (debugEnabled())
+      {
+        debugCought(DebugLogLevel.ERROR, ce);
+      }
 
       unacceptableReasons.add(ce.getMessage());
       return false;
     }
     catch (InitializationException ie)
     {
-      assert debugException(CLASS_NAME, "hasAcceptableConfiguration", ie);
+      if (debugEnabled())
+      {
+        debugCought(DebugLogLevel.ERROR, ie);
+      }
 
       unacceptableReasons.add(ie.getMessage());
       return false;
@@ -460,9 +457,6 @@
   public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
                                                   boolean detailedResults)
   {
-    assert debugEnter(CLASS_NAME, "applyNewConfiguration",
-                      String.valueOf(configEntry),
-                      String.valueOf(detailedResults));
 
     assert configEntry.getDN().equals(this.currentPolicy.getConfigEntryDN() )
             : "Internal Error: mismatch between DN of configuration entry and"
@@ -476,7 +470,10 @@
     }
     catch (ConfigException ce)
     {
-      assert debugException(CLASS_NAME, "applyNewConfiguration", ce);
+      if (debugEnabled())
+      {
+        debugCought(DebugLogLevel.ERROR, ce);
+      }
       ArrayList<String> messages = new ArrayList<String>();
       messages.add(ce.getMessage());
       return new ConfigChangeResult(
@@ -485,7 +482,10 @@
     }
     catch (InitializationException ie)
     {
-      assert debugException(CLASS_NAME, "applyNewConfiguration", ie);
+      if (debugEnabled())
+      {
+        debugCought(DebugLogLevel.ERROR, ie);
+      }
       ArrayList<String> messages = new ArrayList<String>();
       messages.add(ie.getMessage());
       return new ConfigChangeResult(

--
Gitblit v1.10.0