You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2005/09/04 11:19:11 UTC

svn commit: r278568 - /directory/shared/ldap/branches/new-codec-integration/apache2-provider/src/java/main/org/apache/asn1new/ldap/pojo/AbandonRequest.java

Author: elecharny
Date: Sun Sep  4 02:19:08 2005
New Revision: 278568

URL: http://svn.apache.org/viewcvs?rev=278568&view=rev
Log:
Added logs

Modified:
    directory/shared/ldap/branches/new-codec-integration/apache2-provider/src/java/main/org/apache/asn1new/ldap/pojo/AbandonRequest.java

Modified: directory/shared/ldap/branches/new-codec-integration/apache2-provider/src/java/main/org/apache/asn1new/ldap/pojo/AbandonRequest.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/new-codec-integration/apache2-provider/src/java/main/org/apache/asn1new/ldap/pojo/AbandonRequest.java?rev=278568&r1=278567&r2=278568&view=diff
==============================================================================
--- directory/shared/ldap/branches/new-codec-integration/apache2-provider/src/java/main/org/apache/asn1new/ldap/pojo/AbandonRequest.java (original)
+++ directory/shared/ldap/branches/new-codec-integration/apache2-provider/src/java/main/org/apache/asn1new/ldap/pojo/AbandonRequest.java Sun Sep  4 02:19:08 2005
@@ -22,6 +22,8 @@
 import org.apache.asn1.codec.EncoderException;
 import org.apache.asn1new.ber.tlv.Value;
 import org.apache.asn1new.ldap.codec.LdapConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * A AbandonRequest Message. Its syntax is :
@@ -33,6 +35,9 @@
  */
 public class AbandonRequest extends LdapMessage
 {
+	/** The logger */
+    private static Logger log = LoggerFactory.getLogger( AbandonRequest.class );
+
     //~ Instance fields ----------------------------------------------------------------------------
 
     /** The abandoned message ID  */
@@ -91,7 +96,14 @@
      */
     public int computeLength()
     {
-        return 1 + 1 + Value.getNbBytes( abandonedMessageId );
+    	int length = 1 + 1 + Value.getNbBytes( abandonedMessageId );
+    	
+    	if ( log.isDebugEnabled() )
+    	{
+    		log.debug( "Message length : " + length );
+    	}
+    	
+        return length;
     }
     
     /**
@@ -104,6 +116,7 @@
     {
         if (buffer == null)
         {
+        	log.error( "Cannot put a PDU in a null buffer !" );
             throw new EncoderException("Cannot put a PDU in a null buffer !");
         }
         
@@ -121,6 +134,7 @@
         }
         catch ( BufferOverflowException boe )
         {
+        	log.error( "The PDU buffer size is too small !" );
             throw new EncoderException("The PDU buffer size is too small !"); 
         }