Author: markt
Date: Mon Jan 15 22:25:02 2018
New Revision: 1821201

URL: http://svn.apache.org/viewvc?rev=1821201&view=rev
Log:
Formatting / comment alignment

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java
    tomcat/trunk/java/org/apache/tomcat/util/buf/CharChunk.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java?rev=1821201&r1=1821200&r2=1821201&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java Mon Jan 15 
22:25:02 2018
@@ -273,6 +273,7 @@ public final class ByteChunk extends Abs
 
 
     // -------------------- Adding data to the buffer --------------------
+
     public void append(byte b) throws IOException {
         makeSpace(1);
 
@@ -317,11 +318,13 @@ public final class ByteChunk extends Abs
             out.realWriteBytes(src, off, len);
             return;
         }
+
         // if we have limit and we're below
         if (len <= limit - end) {
             // makeSpace will grow the buffer to the limit,
             // so we have space
             System.arraycopy(src, off, buff, end, len);
+
             end += len;
             return;
         }

Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/CharChunk.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/CharChunk.java?rev=1821201&r1=1821200&r2=1821201&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/CharChunk.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/CharChunk.java Mon Jan 15 
22:25:02 2018
@@ -178,7 +178,7 @@ public final class CharChunk extends Abs
     }
 
 
-    // -------------------- Adding data --------------------
+    // -------------------- Adding data to the buffer --------------------
 
     public void append(char b) throws IOException {
         makeSpace(1);
@@ -217,8 +217,9 @@ public final class CharChunk extends Abs
         }
 
         // Optimize on a common case.
-        // If the source is going to fill up all the space in buffer, may
-        // as well write it directly to the output, and avoid an extra copy
+        // If the buffer is empty and the source is going to fill up all the
+        // space in buffer, may as well write it directly to the output,
+        // and avoid an extra copy
         if (optimizedWrite && len == limit && end == start && out != null) {
             out.realWriteChars(src, off, len);
             return;



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to