directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r443427 - /directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
Date Thu, 14 Sep 2006 17:44:22 GMT
Author: elecharny
Date: Thu Sep 14 10:44:21 2006
New Revision: 443427

URL: http://svn.apache.org/viewvc?view=rev&rev=443427
Log:
Fixed DIRSERVER_741, and remove the last line comment.

Modified:
    directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java

Modified: directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java?view=diff&rev=443427&r1=443426&r2=443427
==============================================================================
--- directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
(original)
+++ directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
Thu Sep 14 10:44:21 2006
@@ -312,8 +312,15 @@
 
         if ( IS_DEBUG )
         {
-            Tag tag = container.getCurrentTLV().getTag();
-            log.debug( "Tag {} has been decoded", tag.toString() );
+            if ( container.getCurrentTLV() != null )
+            {
+                Tag tag = container.getCurrentTLV().getTag();
+                log.debug( "Tag {} has been decoded", tag.toString() );
+            }
+            else
+            {
+                log.debug( "Tag has been decoded, but is null" );
+            }
         }
 
         // Create a link between the current TLV with its parent
@@ -513,7 +520,14 @@
 
             if ( IS_DEBUG )
             {
-                log.debug( "Root TLV[{}]", new Integer( tlv.getLength().getLength() ) );
+                if  ( ( tlv != null ) && ( tlv.getLength() != null ) ) 
+                {
+                    log.debug( "Root TLV[{}]", new Integer( tlv.getLength().getLength() )
);
+                }
+                else
+                {
+                    log.debug( "Root TLV[ null ]");
+                }
             }
         }
         else
@@ -974,11 +988,25 @@
 
             if ( container.getState() == TLVStateEnum.PDU_DECODED )
             {
-                log.debug( "<-- Stop decoding : {}", container.getCurrentTLV().toString()
);
+                if ( container.getCurrentTLV() != null )
+                {
+                    log.debug( "<-- Stop decoding : {}", container.getCurrentTLV().toString()
);
+                }
+                else
+                {
+                    log.debug( "<-- Stop decoding : null current TLV" );
+                }
             }
             else
             {
-                log.debug( "<-- End decoding : {}", container.getCurrentTLV().toString()
);
+                if ( container.getCurrentTLV() != null )
+                {
+                    log.debug( "<-- End decoding : {}", container.getCurrentTLV().toString()
);
+                }
+                else
+                {
+                    log.debug( "<-- End decoding : null current TLV" );
+                }
             }
 
             log.debug( "<<<==========================================" );
@@ -1075,5 +1103,5 @@
         this.maxTagLength = maxTagLength;
     }
 
-} // end class TLVTagDecoder
+}
 



Mime
View raw message