Author: markt
Date: Fri Aug 10 15:26:16 2018
New Revision: 1837812

URL: http://svn.apache.org/viewvc?rev=1837812&view=rev
Log:
More typos reported by Kazuhiro Sera.

Modified:
    
tomcat/trunk/java/org/apache/coyote/http11/filters/SavedRequestInputFilter.java
    tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
    tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java
    tomcat/trunk/java/org/apache/tomcat/util/buf/C2BConverter.java
    tomcat/trunk/java/org/apache/tomcat/util/buf/CharChunk.java

Modified: 
tomcat/trunk/java/org/apache/coyote/http11/filters/SavedRequestInputFilter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/filters/SavedRequestInputFilter.java?rev=1837812&r1=1837811&r2=1837812&view=diff
==============================================================================
--- 
tomcat/trunk/java/org/apache/coyote/http11/filters/SavedRequestInputFilter.java 
(original)
+++ 
tomcat/trunk/java/org/apache/coyote/http11/filters/SavedRequestInputFilter.java 
Fri Aug 10 15:26:16 2018
@@ -52,7 +52,7 @@ public class SavedRequestInputFilter imp
 
         ByteBuffer byteBuffer = handler.getByteBuffer();
         byteBuffer.position(byteBuffer.limit()).limit(byteBuffer.capacity());
-        input.substract(byteBuffer);
+        input.subtract(byteBuffer);
 
         return byteBuffer.remaining();
     }

Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java?rev=1837812&r1=1837811&r2=1837812&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java Fri Aug 10 
15:26:16 2018
@@ -158,7 +158,7 @@ public class B2CConverter {
             int pos = cb.position();
             // Loop until one char is decoded or there is a decoder error
             do {
-                leftovers.put(bc.substractB());
+                leftovers.put(bc.subtractB());
                 leftovers.flip();
                 result = decoder.decode(leftovers, cb, endOfInput);
                 leftovers.position(leftovers.limit());
@@ -188,7 +188,7 @@ public class B2CConverter {
             if (bc.getLength() > 0) {
                 leftovers.limit(leftovers.array().length);
                 leftovers.position(bc.getLength());
-                bc.substract(leftovers.array(), 0, bc.getLength());
+                bc.subtract(leftovers.array(), 0, bc.getLength());
             }
         }
     }

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=1837812&r1=1837811&r2=1837812&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java Fri Aug 10 
15:26:16 2018
@@ -389,15 +389,32 @@ public final class ByteChunk extends Abs
 
     // -------------------- Removing data from the buffer --------------------
 
+    /*
+     * @deprecated Use {@link #subtract()}.
+     *             This method will be removed in Tomcat 10
+     */
+    @Deprecated
     public int substract() throws IOException {
+        return subtract();
+    }
+
+    public int subtract() throws IOException {
         if (checkEof()) {
             return -1;
         }
         return buff[start++] & 0xFF;
     }
 
-
+    /*
+     * @deprecated Use {@link #subtractB()}.
+     *             This method will be removed in Tomcat 10
+     */
+    @Deprecated
     public byte substractB() throws IOException {
+        return subtractB();
+    }
+
+    public byte subtractB() throws IOException {
         if (checkEof()) {
             return -1;
         }
@@ -405,7 +422,16 @@ public final class ByteChunk extends Abs
     }
 
 
+    /*
+     * @deprecated Use {@link #subtract(byte[],int,int)}.
+     *             This method will be removed in Tomcat 10
+     */
+    @Deprecated
     public int substract(byte dest[], int off, int len) throws IOException {
+        return subtract(dest, off, len);
+    }
+
+    public int subtract(byte dest[], int off, int len) throws IOException {
         if (checkEof()) {
             return -1;
         }
@@ -429,8 +455,28 @@ public final class ByteChunk extends Abs
      * @return an integer specifying the actual number of bytes read, or -1 if
      *         the end of the stream is reached
      * @throws IOException if an input or output exception has occurred
+     *
+     * @deprecated Use {@link #subtract(ByteBuffer)}.
+     *             This method will be removed in Tomcat 10
      */
+    @Deprecated
     public int substract(ByteBuffer to) throws IOException {
+        return subtract(to);
+    }
+
+
+    /**
+     * Transfers bytes from the buffer to the specified ByteBuffer. After the
+     * operation the position of the ByteBuffer will be returned to the one
+     * before the operation, the limit will be the position incremented by the
+     * number of the transfered bytes.
+     *
+     * @param to the ByteBuffer into which bytes are to be written.
+     * @return an integer specifying the actual number of bytes read, or -1 if
+     *         the end of the stream is reached
+     * @throws IOException if an input or output exception has occurred
+     */
+    public int subtract(ByteBuffer to) throws IOException {
         if (checkEof()) {
             return -1;
         }

Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/C2BConverter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/C2BConverter.java?rev=1837812&r1=1837811&r2=1837812&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/C2BConverter.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/C2BConverter.java Fri Aug 10 
15:26:16 2018
@@ -88,7 +88,7 @@ public final class C2BConverter {
             int pos = bb.position();
             // Loop until one char is encoded or there is a encoder error
             do {
-                leftovers.put((char) cc.substract());
+                leftovers.put((char) cc.subtract());
                 leftovers.flip();
                 result = encoder.encode(leftovers, bb, false);
                 leftovers.position(leftovers.limit());
@@ -117,7 +117,7 @@ public final class C2BConverter {
             if (cc.getLength() > 0) {
                 leftovers.limit(leftovers.array().length);
                 leftovers.position(cc.getLength());
-                cc.substract(leftovers.array(), 0, cc.getLength());
+                cc.subtract(leftovers.array(), 0, cc.getLength());
             }
         }
     }

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=1837812&r1=1837811&r2=1837812&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/CharChunk.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/CharChunk.java Fri Aug 10 
15:26:16 2018
@@ -290,7 +290,16 @@ public final class CharChunk extends Abs
 
     // -------------------- Removing data from the buffer --------------------
 
+    /*
+     * @deprecated Use {@link #subtract()}.
+     *             This method will be removed in Tomcat 10
+     */
+    @Deprecated
     public int substract() throws IOException {
+        return subtract();
+    }
+
+    public int subtract() throws IOException {
         if (checkEof()) {
             return -1;
         }
@@ -298,7 +307,16 @@ public final class CharChunk extends Abs
     }
 
 
+    /*
+     * @deprecated Use {@link #subtract(char[],int,int)}.
+     *             This method will be removed in Tomcat 10
+     */
+    @Deprecated
     public int substract(char dest[], int off, int len) throws IOException {
+        return subtract(dest, off, len);
+    }
+
+    public int subtract(char dest[], int off, int len) throws IOException {
         if (checkEof()) {
             return -1;
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to