directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r159204 - directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/utils/DNUtils.java
Date Sun, 27 Mar 2005 22:46:57 GMT
Author: elecharny
Date: Sun Mar 27 14:46:56 2005
New Revision: 159204

URL: http://svn.apache.org/viewcvs?view=rev&rev=159204
Log:
Correcting an infinite loop in DNUtils.areEquals(char[], int, String) method

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/utils/DNUtils.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/utils/DNUtils.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/utils/DNUtils.java?view=diff&r1=159203&r2=159204
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/utils/DNUtils.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/utils/DNUtils.java
Sun Mar 27 14:46:56 2005
@@ -695,7 +695,7 @@
      *
      * @return <code>true</code> if the buffer contains the text.
      */
-    public static int areEquals( byte[] charArray, int index, String text )
+    public static int areEquals( char[] charArray, int index, String text )
     {
 
         if ( ( charArray == null ) || ( charArray.length == 0 ) || ( charArray.length <=
index ) ||
@@ -706,7 +706,10 @@
         }
         else
         {
-        	return areEquals(charArray, index, text);
+        	char[] data = new char[text.length()];
+        	
+        	text.getChars(0, text.length(), data, 0);
+        	return areEquals(charArray, index, data);
         }
     }
 



Mime
View raw message