tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1228924 - in /tomcat/trunk/java/org/apache/tomcat/util/buf: Ascii.java ByteChunk.java C2BConverter.java CharChunk.java MessageBytes.java
Date Sun, 08 Jan 2012 19:15:53 GMT
Author: markt
Date: Sun Jan  8 19:15:52 2012
New Revision: 1228924

URL: http://svn.apache.org/viewvc?rev=1228924&view=rev
Log:
Remove unused code

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/buf/Ascii.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
    tomcat/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/Ascii.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/Ascii.java?rev=1228924&r1=1228923&r2=1228924&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/Ascii.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/Ascii.java Sun Jan  8 19:15:52 2012
@@ -70,61 +70,6 @@ public final class Ascii {
     }
 
     /**
-     * Parses an unsigned integer from the specified subarray of bytes.
-     * @param b the bytes to parse
-     * @param off the start offset of the bytes
-     * @param len the length of the bytes
-     * @exception NumberFormatException if the integer format was invalid
-     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
-     */
-    @Deprecated
-    public static int parseInt(byte[] b, int off, int len)
-        throws NumberFormatException
-    {
-        int c;
-
-        if (b == null || len <= 0 || !isDigit(c = b[off++])) {
-            throw new NumberFormatException();
-        }
-
-        int n = c - '0';
-
-        while (--len > 0) {
-            if (!isDigit(c = b[off++])) {
-                throw new NumberFormatException();
-            }
-            n = n * 10 + c - '0';
-        }
-
-        return n;
-    }
-
-    /**
-     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
-     */
-    @Deprecated
-    public static int parseInt(char[] b, int off, int len)
-        throws NumberFormatException
-    {
-        int c;
-
-        if (b == null || len <= 0 || !isDigit(c = b[off++])) {
-            throw new NumberFormatException();
-        }
-
-        int n = c - '0';
-
-        while (--len > 0) {
-            if (!isDigit(c = b[off++])) {
-                throw new NumberFormatException();
-            }
-            n = n * 10 + c - '0';
-        }
-
-        return n;
-    }
-
-    /**
      * Parses an unsigned long from the specified subarray of bytes.
      * @param b the bytes to parse
      * @param off the start offset of the bytes

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=1228924&r1=1228923&r2=1228924&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java Sun Jan  8 19:15:52 2012
@@ -492,15 +492,6 @@ public final class ByteChunk implements 
         return new String(cb.array(), cb.arrayOffset(), cb.length());
     }
 
-    /**
-     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
-     */
-    @Deprecated
-    public int getInt()
-    {
-        return Ascii.parseInt(buff, start,end-start);
-    }
-
     public long getLong() {
         return Ascii.parseLong(buff, start,end-start);
     }
@@ -604,28 +595,6 @@ public final class ByteChunk implements 
     /**
      * Returns true if the message bytes starts with the specified string.
      * @param s the string
-     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
-     */
-    @Deprecated
-    public boolean startsWith(String s) {
-        // Works only if enc==UTF
-        byte[] b = buff;
-        int blen = s.length();
-        if (b == null || blen > end-start) {
-            return false;
-        }
-        int boff = start;
-        for (int i = 0; i < blen; i++) {
-            if (b[boff++] != s.charAt(i)) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-     * Returns true if the message bytes starts with the specified string.
-     * @param s the string
      * @param pos The position
      */
     public boolean startsWithIgnoreCase(String s, int pos) {

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=1228924&r1=1228923&r2=1228924&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/C2BConverter.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/C2BConverter.java Sun Jan  8 19:15:52 2012
@@ -200,14 +200,6 @@ final class IntermediateOutputStream ext
 
     // -------------------- Internal methods --------------------
 
-    /**
-     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
-     */
-    @Deprecated
-    void setByteChunk( ByteChunk bb ) {
-        tbuff=bb;
-    }
-
     /** Temporary disable - this is used to recycle the converter without
      *  generating an output if the buffers were not flushed
      */

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=1228924&r1=1228923&r2=1228924&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/CharChunk.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/CharChunk.java Sun Jan  8 19:15:52 2012
@@ -568,18 +568,6 @@ public final class CharChunk implements 
         return code;
     }
 
-    /**
-     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
-     */
-    @Deprecated
-    public int hashIgnoreCase() {
-        int code=0;
-        for (int i = start; i < end; i++) {
-            code = code * 37 + Ascii.toLower(buff[i]);
-        }
-        return code;
-    }
-
     public int indexOf(char c) {
         return indexOf( c, start);
     }

Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java?rev=1228924&r1=1228923&r2=1228924&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java Sun Jan  8 19:15:52 2012
@@ -422,26 +422,6 @@ public final class MessageBytes implemen
         return upper.indexOf( sU, starting );
     }
 
-    /**
-     * Returns true if the message bytes starts with the specified string.
-     * @param c the character
-     * @param starting The start position
-     * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
-     */
-    @Deprecated
-    public int indexOf(char c, int starting) {
-        switch (type) {
-        case T_STR:
-            return strValue.indexOf( c, starting );
-        case T_CHARS:
-            return charC.indexOf( c, starting);
-        case T_BYTES:
-            return byteC.indexOf( c, starting );
-        default:
-            return -1;
-        }
-    }
-
     /** Copy the src into this MessageBytes, allocating more space if
      *  needed
      */



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


Mime
View raw message