directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r165495 - /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/spnego/pojo/SpnegoNegTokenInitPOJO.java
Date Sun, 01 May 2005 12:26:47 GMT
Author: elecharny
Date: Sun May  1 05:26:47 2005
New Revision: 165495

URL: http://svn.apache.org/viewcvs?rev=165495&view=rev
Log:
Two bugs corrected :
- first, the test is against current OID's length, not the array length
- second, it's OK to copy the array, but the member must also be updated...

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/spnego/pojo/SpnegoNegTokenInitPOJO.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/spnego/pojo/SpnegoNegTokenInitPOJO.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/spnego/pojo/SpnegoNegTokenInitPOJO.java?rev=165495&r1=165494&r2=165495&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/spnego/pojo/SpnegoNegTokenInitPOJO.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/spnego/pojo/SpnegoNegTokenInitPOJO.java
Sun May  1 05:26:47 2005
@@ -291,12 +291,13 @@
      */
     public void addMechTypeList( OID mechType )
     {
-        if ( mechTypeList.length == mechTypeListMaxSize)
+        if ( mechTypeListCurrentSize == mechTypeListMaxSize)
         {
             // If the maximum size is reached, we will allocate 10 more slots.
             mechTypeListMaxSize += 10;
             OID[] newMechTypesList = new OID[mechTypeListMaxSize];
             System.arraycopy(this.mechTypeList, 0, newMechTypesList, 0, mechTypeList.length);
+            this.mechTypeList = newMechTypesList;
         }
         
         mechTypeList[mechTypeListCurrentSize++] = mechType;



Mime
View raw message