tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ke...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf ByteChunk.java CharChunk.java
Date Thu, 07 Feb 2002 05:37:35 GMT
keith       02/02/06 21:37:35

  Modified:    util/java/org/apache/tomcat/util/buf ByteChunk.java
                        CharChunk.java
  Log:
  indexOf should return an index relative to the internal
  starting point of the string rather than the beginning
  of the array.  Ported over from main j-t repository.
  
  Revision  Changes    Path
  1.6       +2 -1      jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf/ByteChunk.java
  
  Index: ByteChunk.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf/ByteChunk.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ByteChunk.java	31 Dec 2001 18:20:04 -0000	1.5
  +++ ByteChunk.java	7 Feb 2002 05:37:35 -0000	1.6
  @@ -626,7 +626,8 @@
        * @param s the string
        */
       public int indexOf(char c, int starting) {
  -	return indexOf( buff, start+starting, end, c);
  +	int ret = indexOf( buff, start+starting, end, c);
  +	return (ret >= start) ? ret - start : -1;
       }
   
       public static int  indexOf( byte bytes[], int off, int end, char qq )
  
  
  
  1.3       +2 -1      jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf/CharChunk.java
  
  Index: CharChunk.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf/CharChunk.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CharChunk.java	29 May 2001 06:22:53 -0000	1.2
  +++ CharChunk.java	7 Feb 2002 05:37:35 -0000	1.3
  @@ -597,7 +597,8 @@
        * @param s the string
        */
       public int indexOf(char c, int starting) {
  -	return indexOf( buff, start+starting, end, c );
  +	int ret = indexOf( buff, start+starting, end, c );
  +	return (ret >= start) ? ret - start : -1;
       }
   
       public static int indexOf( char chars[], int off, int cend, char qq )
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message