remm        2004/03/05 05:06:13

  Modified:    util/java/org/apache/tomcat/util/buf ByteChunk.java
  Log:
  - In makeSpace, we should compare the desiredSpace to the limit, so that
    we actually allow enough. Otherwise, the amount would be slower, violating
    the makeSpace assertion.
  - This doesn't fix anything for ByteChunk as AFAIK start is (almost ?) always 0
    for "growable" buffers.
  
  Revision  Changes    Path
  1.18      +2 -2      
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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- ByteChunk.java    24 Feb 2004 08:50:06 -0000      1.17
  +++ ByteChunk.java    5 Mar 2004 13:06:13 -0000       1.18
  @@ -406,8 +406,8 @@
   
        // Can't grow above the limit
        if( limit > 0 &&
  -         desiredSize > limit -start  ) {
  -         desiredSize=limit -start;
  +         desiredSize > limit) {
  +         desiredSize=limit;
        }
   
        if( buff==null ) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to