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/LDAPPostReadRequestControl.java |   38 ++++++++------------------------------
 1 files changed, 8 insertions(+), 30 deletions(-)

diff --git a/opends/src/server/org/opends/server/controls/LDAPPostReadRequestControl.java b/opends/src/server/org/opends/server/controls/LDAPPostReadRequestControl.java
index ddf057f..70b65a7 100644
--- a/opends/src/server/org/opends/server/controls/LDAPPostReadRequestControl.java
+++ b/opends/src/server/org/opends/server/controls/LDAPPostReadRequestControl.java
@@ -22,7 +22,7 @@
  * CDDL HEADER END
  *
  *
- *      Portions Copyright 2006 Sun Microsystems, Inc.
+ *      Portions Copyright 2006-2007 Sun Microsystems, Inc.
  */
 package org.opends.server.controls;
 
@@ -43,7 +43,9 @@
 import org.opends.server.types.Control;
 import org.opends.server.types.ObjectClass;
 
-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.*;
@@ -60,11 +62,6 @@
 public class LDAPPostReadRequestControl
        extends Control
 {
-  /**
-   * The fully-qualified name of this class for debugging purposes.
-   */
-  private static final String CLASS_NAME =
-       "org.opends.server.controls.LDAPPostReadRequestControl";
 
 
 
@@ -100,8 +97,6 @@
     super(OID_LDAP_READENTRY_POSTREAD, isCritical,
           encodeAttributes(rawAttributes));
 
-    assert debugConstructor(CLASS_NAME, String.valueOf(isCritical),
-                            String.valueOf(rawAttributes));
 
     if (rawAttributes == null)
     {
@@ -135,9 +130,6 @@
   {
     super(oid, isCritical, encodeAttributes(rawAttributes));
 
-    assert debugConstructor(CLASS_NAME, String.valueOf(oid),
-                            String.valueOf(isCritical),
-                            String.valueOf(rawAttributes));
 
     if (rawAttributes == null)
     {
@@ -173,10 +165,6 @@
   {
     super(oid, isCritical, encodedValue);
 
-    assert debugConstructor(CLASS_NAME, String.valueOf(oid),
-                            String.valueOf(isCritical),
-                            String.valueOf(rawAttributes),
-                            String.valueOf(encodedValue));
 
     if (rawAttributes == null)
     {
@@ -210,7 +198,6 @@
   public static LDAPPostReadRequestControl decodeControl(Control control)
          throws LDAPException
   {
-    assert debugEnter(CLASS_NAME, "decodeControl", String.valueOf(control));
 
     if (! control.hasValue())
     {
@@ -232,7 +219,10 @@
     }
     catch (ASN1Exception ae)
     {
-      assert debugException(CLASS_NAME, "decodeControl", ae);
+      if (debugEnabled())
+      {
+        debugCought(DebugLogLevel.ERROR, ae);
+      }
 
       int    msgID   = MSGID_POSTREADREQ_CANNOT_DECODE_VALUE;
       String message = getMessage(msgID, ae.getMessage());
@@ -260,8 +250,6 @@
   private static ASN1OctetString encodeAttributes(LinkedHashSet<String>
                                                        rawAttributes)
   {
-    assert debugEnter(CLASS_NAME, "encodeAttributes",
-                      String.valueOf(rawAttributes));
 
     if (rawAttributes == null)
     {
@@ -289,7 +277,6 @@
    */
   public LinkedHashSet<String> getRawAttributes()
   {
-    assert debugEnter(CLASS_NAME, "getRawAttributes");
 
     return rawAttributes;
   }
@@ -304,8 +291,6 @@
    */
   public void setRawAttributes(LinkedHashSet<String> rawAttributes)
   {
-    assert debugEnter(CLASS_NAME, "setRawAttributes",
-                      String.valueOf(rawAttributes));
 
     if (rawAttributes == null)
     {
@@ -331,7 +316,6 @@
    */
   public LinkedHashSet<AttributeType> getRequestedAttributes()
   {
-    assert debugEnter(CLASS_NAME, "getRequestedAttributes");
 
     if (requestedAttributes == null)
     {
@@ -391,7 +375,6 @@
    */
   public boolean returnAllUserAttributes()
   {
-    assert debugEnter(CLASS_NAME, "returnAllUserAttributes");
 
     if (requestedAttributes == null)
     {
@@ -415,7 +398,6 @@
    */
   public boolean returnAllOperationalAttributes()
   {
-    assert debugEnter(CLASS_NAME, "returnAllOperationalAttributes");
 
     if (requestedAttributes == null)
     {
@@ -439,8 +421,6 @@
    */
   public boolean allowsAttribute(AttributeType attrType)
   {
-    assert debugEnter(CLASS_NAME, "allowsAttribute",
-                      String.valueOf(attrType));
 
     if (requestedAttributes == null)
     {
@@ -471,7 +451,6 @@
    */
   public String toString()
   {
-    assert debugEnter(CLASS_NAME, "toString");
 
     StringBuilder buffer = new StringBuilder();
     toString(buffer);
@@ -488,7 +467,6 @@
    */
   public void toString(StringBuilder buffer)
   {
-    assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
 
     buffer.append("LDAPPostReadRequestControl(criticality=");
     buffer.append(isCritical());

--
Gitblit v1.10.0