directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r234390 - /directory/asn1/branches/asn1-new-ber/ber-new/src/java/main/org/apache/asn1new/ber/Asn1Decoder.java
Date Sun, 21 Aug 2005 23:20:28 GMT
Author: elecharny
Date: Sun Aug 21 16:20:26 2005
New Revision: 234390

URL: http://svn.apache.org/viewcvs?rev=234390&view=rev
Log:
The decode method does nor return a boolean anymore. 

Modified:
    directory/asn1/branches/asn1-new-ber/ber-new/src/java/main/org/apache/asn1new/ber/Asn1Decoder.java

Modified: directory/asn1/branches/asn1-new-ber/ber-new/src/java/main/org/apache/asn1new/ber/Asn1Decoder.java
URL: http://svn.apache.org/viewcvs/directory/asn1/branches/asn1-new-ber/ber-new/src/java/main/org/apache/asn1new/ber/Asn1Decoder.java?rev=234390&r1=234389&r2=234390&view=diff
==============================================================================
--- directory/asn1/branches/asn1-new-ber/ber-new/src/java/main/org/apache/asn1new/ber/Asn1Decoder.java
(original)
+++ directory/asn1/branches/asn1-new-ber/ber-new/src/java/main/org/apache/asn1new/ber/Asn1Decoder.java
Sun Aug 21 16:20:26 2005
@@ -784,12 +784,12 @@
      * or if the PDU has been fully decoded. 
      *
      * @param stream The ByteBuffer containing the PDU to decode
-     * @param container The container that storethe state, the result and
+     * @param container The container that store the state, the result and
      * other elements.
-     *
-     * @throws DecoderException Thrown if enything went wrong!
+     * 
+     * @throws DecoderException Thrown if anything went wrong!
      */
-    public boolean decode( ByteBuffer stream, IAsn1Container container ) throws org.apache.asn1.codec.DecoderException
+    public void decode( ByteBuffer stream, IAsn1Container container ) throws org.apache.asn1.codec.DecoderException
     {
 
         /* We have to deal with the current state. This is an
@@ -802,7 +802,6 @@
          */
 
         boolean hasRemaining = stream.hasRemaining();
-        boolean isDecoded = false;
 
         if ( DEBUG )
         {
@@ -886,8 +885,6 @@
                 case TLVStateEnum.TLV_STATE_DONE :
                     hasRemaining = treatTLVDoneState( stream, container );
                     
-                    // Check if the PDU is fully decoded
-                    isDecoded = ( container.getState() == TLVStateEnum.PDU_DECODED );
                     break;
 
                 case TLVStateEnum.PDU_DECODED :
@@ -898,7 +895,6 @@
                         log.warn("The PDU has been fully decoded but there are still bytes
in the buffer.");
                     }
                     
-                    isDecoded = true;
                     hasRemaining = false;
                     
                     break;
@@ -909,7 +905,7 @@
         {
             log.debug( "<<<------------------------------------------" );
             
-            if ( isDecoded )
+            if ( container.getState() == TLVStateEnum.PDU_DECODED )
             {
                 log.debug( "<-- Stop decoding : " + container.getCurrentTLV().toString()
);
             }
@@ -921,7 +917,7 @@
             log.debug( "<<<==========================================" );
         }
         
-        return isDecoded;
+        return;
     } // end method decode
 
     /**



Mime
View raw message