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/controls/ProxiedAuthV1Control.java |   32 +++++++-------------------------
 1 files changed, 7 insertions(+), 25 deletions(-)

diff --git a/opends/src/server/org/opends/server/controls/ProxiedAuthV1Control.java b/opends/src/server/org/opends/server/controls/ProxiedAuthV1Control.java
index 4af026e..3e0b530 100644
--- a/opends/src/server/org/opends/server/controls/ProxiedAuthV1Control.java
+++ b/opends/src/server/org/opends/server/controls/ProxiedAuthV1Control.java
@@ -45,7 +45,9 @@
 import org.opends.server.types.LockManager;
 import org.opends.server.types.ResultCode;
 
-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.MessageHandler.*;
 import static org.opends.server.messages.ProtocolMessages.*;
 import static org.opends.server.util.ServerConstants.*;
@@ -66,11 +68,6 @@
 public class ProxiedAuthV1Control
        extends Control
 {
-  /**
-   * The fully-qualified name of this class for debugging purposes.
-   */
-  private static final String CLASS_NAME =
-       "org.opends.server.controls.ProxiedAuthV1Control";
 
 
 
@@ -93,7 +90,6 @@
   {
     super(OID_PROXIED_AUTH_V1, true, encodeValue(rawAuthorizationDN));
 
-    assert debugConstructor(CLASS_NAME, String.valueOf(rawAuthorizationDN));
 
     this.rawAuthorizationDN = rawAuthorizationDN;
 
@@ -114,7 +110,6 @@
     super(OID_PROXIED_AUTH_V1, true,
           encodeValue(new ASN1OctetString(authorizationDN.toString())));
 
-    assert debugConstructor(CLASS_NAME, String.valueOf(authorizationDN));
 
     this.authorizationDN = authorizationDN;
 
@@ -141,10 +136,6 @@
   {
     super(oid, isCritical, controlValue);
 
-    assert debugConstructor(CLASS_NAME, String.valueOf(oid),
-                            String.valueOf(isCritical),
-                            String.valueOf(controlValue),
-                            String.valueOf(rawAuthorizationDN));
 
     this.rawAuthorizationDN = rawAuthorizationDN;
 
@@ -165,8 +156,6 @@
    */
   private static ASN1OctetString encodeValue(ASN1OctetString rawAuthorizationDN)
   {
-    assert debugEnter(CLASS_NAME, "encodeValue",
-                      String.valueOf(rawAuthorizationDN));
 
     ensureNotNull(rawAuthorizationDN);
 
@@ -195,7 +184,6 @@
   public static ProxiedAuthV1Control decodeControl(Control control)
          throws LDAPException
   {
-    assert debugEnter(CLASS_NAME, "decodeControl", String.valueOf(control));
 
     ensureNotNull(control);
 
@@ -235,7 +223,10 @@
     }
     catch (Exception e)
     {
-      assert debugException(CLASS_NAME, "decodeControl", e);
+      if (debugEnabled())
+      {
+        debugCought(DebugLogLevel.ERROR, e);
+      }
 
       int    msgID   = MSGID_PROXYAUTH1_CANNOT_DECODE_VALUE;
       String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -255,7 +246,6 @@
    */
   public ASN1OctetString getRawAuthorizationDN()
   {
-    assert debugEnter(CLASS_NAME, "getRawAuthorizationDN");
 
     return rawAuthorizationDN;
   }
@@ -271,8 +261,6 @@
    */
   public void setRawAuthorizationDN(ASN1OctetString rawAuthorizationDN)
   {
-    assert debugEnter(CLASS_NAME, "setRawAuthorizationDN",
-                      String.valueOf(rawAuthorizationDN));
 
     this.rawAuthorizationDN = rawAuthorizationDN;
 
@@ -293,7 +281,6 @@
   public DN getAuthorizationDN()
          throws DirectoryException
   {
-    assert debugEnter(CLASS_NAME, "getAuthorizationDN");
 
     if (authorizationDN == null)
     {
@@ -313,8 +300,6 @@
    */
   public void setAuthorizationDN(DN authorizationDN)
   {
-    assert debugEnter(CLASS_NAME, "setAuthorizationDN",
-                      String.valueOf(authorizationDN));
 
     ensureNotNull(authorizationDN);
 
@@ -343,7 +328,6 @@
   public Entry getAuthorizationEntry()
          throws DirectoryException
   {
-    assert debugEnter(CLASS_NAME, "getAuthorizationEntry");
 
     DN authzDN = getAuthorizationDN();
     if (authzDN.isNullDN())
@@ -427,7 +411,6 @@
    */
   public String toString()
   {
-    assert debugEnter(CLASS_NAME, "toString");
 
     StringBuilder buffer = new StringBuilder();
     toString(buffer);
@@ -444,7 +427,6 @@
    */
   public void toString(StringBuilder buffer)
   {
-    assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
 
     buffer.append("ProxiedAuthorizationV1Control(authorizationDN=\"");
     rawAuthorizationDN.toString(buffer);

--
Gitblit v1.10.0