directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r169730 - /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/primitives/OID.java
Date Wed, 11 May 2005 23:38:22 GMT
Author: elecharny
Date: Wed May 11 16:38:21 2005
New Revision: 169730

URL: http://svn.apache.org/viewcvs?rev=169730&view=rev
Log:
Added a method that gives the number of bytes necessary to store an OID

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/primitives/OID.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/primitives/OID.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/primitives/OID.java?rev=169730&r1=169729&r2=169730&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/primitives/OID.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/primitives/OID.java Wed
May 11 16:38:21 2005
@@ -328,23 +328,23 @@
 
         if (value < 128)
         {
-            nbBytes += 1;
+            nbBytes = 1;
         } 
         else if (value < 16384)
         {
-            nbBytes += 2;
+            nbBytes = 2;
         }
         else if (value < 2097152)
         {
-            nbBytes += 3;
+            nbBytes = 3;
         }
         else if (value < 268435456)
         {
-            nbBytes += 4;
+            nbBytes = 4;
         }
         else 
         {
-            nbBytes += 5;
+            nbBytes = 5;
         }
 
         for (int i = 2; i < oidValues.length; i++ )



Mime
View raw message