You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2001/05/29 02:55:33 UTC

cvs commit: jakarta-tomcat/src/share/org/apache/jasper/runtime BodyContentImpl.java

marcsaeg    01/05/28 17:55:33

  Modified:    src/share/org/apache/jasper/runtime Tag: tomcat_32
                        BodyContentImpl.java
  Log:
  Larry found this one while comparing 3.2.2 with 3.3.  Hopefully this is the
  last time we need to 'fix' this buffer sizing problem.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.6.6.5   +9 -13     jakarta-tomcat/src/share/org/apache/jasper/runtime/BodyContentImpl.java
  
  Index: BodyContentImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/BodyContentImpl.java,v
  retrieving revision 1.6.6.4
  retrieving revision 1.6.6.5
  diff -u -r1.6.6.4 -r1.6.6.5
  --- BodyContentImpl.java	2001/04/23 19:00:20	1.6.6.4
  +++ BodyContentImpl.java	2001/05/29 00:55:32	1.6.6.5
  @@ -109,19 +109,15 @@
   
           char[] tmp = null;
   
  -	//XXX Should it be multiple of DEFAULT_BUFFER_SIZE??
  -
  -    int newBufferSize = bufferSize * 2;
  -    if (len <= newBufferSize) {
  -	    bufferSize = newBufferSize;
  -	    tmp = new char [bufferSize];
  -	} else {
  -	    tmp = new char [bufferSize + len];
  -	    bufferSize += len;
  -	}
  -	System.arraycopy(cb, 0, tmp, 0, cb.length);
  -	cb = tmp;
  -	tmp = null;
  +        if(len <= bufferSize){
  +            bufferSize *= 2;
  +        }else{
  +            bufferSize += len;
  +        }
  +        tmp = new char[bufferSize];
  +        System.arraycopy(cb, 0, tmp, 0, cb.length);
  +        cb = tmp;
  +        tmp = null;
       }
   
       /**