tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/jasper/runtime BodyContentImpl.java PageContextImpl.java
Date Fri, 23 Mar 2001 02:21:21 GMT
costin      01/03/22 18:21:21

  Modified:    src/share/org/apache/jasper/runtime BodyContentImpl.java
                        PageContextImpl.java
  Log:
  Double the size of the buffer, as before ( sorry again for undoing your
  change ).
  
  Removed the logger dependency ( that was used only to report a case that
  shouldn't happen )
  
  Revision  Changes    Path
  1.10      +6 -4      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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- BodyContentImpl.java	2001/03/21 19:50:51	1.9
  +++ BodyContentImpl.java	2001/03/23 02:21:20	1.10
  @@ -103,6 +103,9 @@
           }
       }
   
  +    /** Make space for len chars. If len is small, allocate
  +	a reserve space too.
  +     */
       private void reAllocBuff (int len) {
           //Need to re-allocate the buffer since it is to be
    	//unbounded according to the updated spec..
  @@ -112,12 +115,11 @@
   	//XXX Should it be multiple of DEFAULT_BUFFER_SIZE??
   
   	if (len <= Constants.DEFAULT_BUFFER_SIZE) {
  -	    tmp = new char [bufferSize + Constants.DEFAULT_BUFFER_SIZE];
  -	    //	    bufferSize = bufferSize * 2;
  -	    bufferSize += Constants.DEFAULT_BUFFER_SIZE;
  +	    bufferSize = bufferSize * 2;
  +	    tmp = new char [bufferSize];
   	} else {
  -	    tmp = new char [bufferSize + len];
   	    bufferSize += len;
  +	    tmp = new char [bufferSize];
   	}
   	System.arraycopy(cb, 0, tmp, 0, cb.length);
   	cb = tmp;
  
  
  
  1.20      +7 -8      jakarta-tomcat/src/share/org/apache/jasper/runtime/PageContextImpl.java
  
  Index: PageContextImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- PageContextImpl.java	2001/03/02 04:51:42	1.19
  +++ PageContextImpl.java	2001/03/23 02:21:20	1.20
  @@ -94,8 +94,6 @@
    */
   public class PageContextImpl extends PageContext {
   
  -    Log loghelper = Log.getLog("JASPER_LOG", "JspFactoryImpl");
  -
       PageContextImpl(JspFactory factory) {
           this.factory = factory;
       }
  @@ -462,12 +460,13 @@
       protected JspWriter _createOut(int bufferSize, boolean autoFlush)
           throws IOException, IllegalArgumentException
       {
  -	try {
  -	    return new JspWriterImpl(response, bufferSize, autoFlush);
  -	} catch( Throwable t ) {
  -	    loghelper.log("creating out", t);
  -	    return null;
  -	}
  +	// This may fail for security expcetions, if the sandbox is broken !!
  +	//	try {
  +	return new JspWriterImpl(response, bufferSize, autoFlush);
  +	// 	} catch( Throwable t ) {
  +	// 	    loghelper.log("creating out", t);
  +	// 	    return null;
  +	// 	}
       }
   
       /*
  
  
  

Mime
View raw message