directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r225419 - in /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo: AbandonRequest.java LdapMessage.java
Date Tue, 26 Jul 2005 23:38:35 GMT
Author: elecharny
Date: Tue Jul 26 16:38:31 2005
New Revision: 225419

URL: http://svn.apache.org/viewcvs?rev=225419&view=rev
Log:
After a deeper analyze, the error was really an error. 
So recommit the fix, but calling Value.getNbBytes instead of Length.getNbBytes
to compute the number of bytes necessary to store an integer as a Value element.

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/AbandonRequest.java
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/LdapMessage.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/AbandonRequest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/AbandonRequest.java?rev=225419&r1=225418&r2=225419&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/AbandonRequest.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/AbandonRequest.java
Tue Jul 26 16:38:31 2005
@@ -16,7 +16,7 @@
  */
 package org.apache.asn1.ldap.pojo;
 
-import org.apache.asn1.ber.tlv.Length;
+import org.apache.asn1.ber.tlv.Value;
 
 /**
  * A AbandonRequest Message. Its syntax is :
@@ -76,7 +76,7 @@
      */
     public int computeLength()
     {
-        return 1 + 1 + Length.getNbBytes( messageId );
+        return 1 + 1 + Value.getNbBytes( messageId );
     }
     
     /**

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/LdapMessage.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/LdapMessage.java?rev=225419&r1=225418&r2=225419&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/LdapMessage.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/LdapMessage.java
Tue Jul 26 16:38:31 2005
@@ -19,6 +19,7 @@
 import org.apache.asn1.Asn1Object;
 import org.apache.asn1.EncoderException;
 import org.apache.asn1.ber.tlv.Length;
+import org.apache.asn1.ber.tlv.Value;
 
 import java.nio.ByteBuffer;
 
@@ -391,7 +392,7 @@
         // - the tag (0x02), 1 byte
         // - the length of the Id length, 1 byte
         // - the Id length, 1 to 4 bytes
-        int ldapMessageLength = 1 + 1 + Length.getNbBytes(messageId);
+        int ldapMessageLength = 1 + 1 + Value.getNbBytes(messageId);
         
         // Get the protocolOp length
         int protocolOpLength = protocolOp.computeLength();



Mime
View raw message