DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=30340>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=30340 substract() disfunctional in CharChunk and ByteChunk classes Summary: substract() disfunctional in CharChunk and ByteChunk classes Product: Tomcat 5 Version: 5.0.0 Platform: All OS/Version: All Status: NEW Severity: Blocker Priority: Other Component: Connector:HTTP AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] If a jsp or a servlet uses char read() on its JspReader, the call is eventually passed to CharChunk (or ByteChunk) substract() method. The method body needs fixing to be functional, see: public int substract() throws IOException { if ((end - start) == 0) { if (in == null) return -1; int n = in.realReadChars(buff, 0, buff.length); if (n < 0) return -1; } return (buff[start++]); } Should set end=start=0 after reading chars from in. The same for ByteChunk. The next method, substract(CharChunk) does it... more or less. Actually, I'd love to straighten up this code a little bit - but it would be better to exchange opinions with the current author, Remy, regarding certain methods and functionality, before doing anything. Thanks, Vlad Patryshev [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]