Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 39805 invoked by uid 500); 23 Mar 2001 06:57:37 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: tomcat-dev@jakarta.apache.org Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 39796 invoked from network); 23 Mar 2001 06:57:37 -0000 Message-ID: <3ABAF3E6.C05E99E1@armassolutions.com> Date: Fri, 23 Mar 2001 00:57:42 -0600 From: Casey Lucas X-Mailer: Mozilla 4.74 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: tomcat-dev@jakarta.apache.org Subject: Re: cvs commit: jakarta-tomcat/src/share/org/apache/jasper/runtime BodyContentImpl.java PageContextImpl.java References: <20010323022121.50746.qmail@apache.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N I noticed that for PageContextImpl you made a comment about removing the log dependency. Was this just because it was used on a case that "shouldn't happen" or is there another reason why jasper components shouldn't rely on tomcat logging code? Just wondering / checking, because some jasper stuff I'm working on uses the same log classes. -Casey costin@apache.org wrote: > > 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; > + // } > } > > /* > > >