tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1043444 - in /tomcat/trunk/java/org/apache/coyote/ajp: AbstractAjpProcessor.java AjpMessage.java Constants.java
Date Wed, 08 Dec 2010 15:07:20 GMT
Author: markt
Date: Wed Dec  8 15:07:20 2010
New Revision: 1043444

URL: http://svn.apache.org/viewvc?rev=1043444&view=rev
Log:
Remove some unused code
Fix some FindBugs niggles

Modified:
    tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
    tomcat/trunk/java/org/apache/coyote/ajp/AjpMessage.java
    tomcat/trunk/java/org/apache/coyote/ajp/Constants.java

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1043444&r1=1043443&r2=1043444&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java Wed Dec  8 15:07:20
2010
@@ -571,7 +571,7 @@ public abstract class AbstractAjpProcess
 
            case Constants.SC_A_SSL_KEY_SIZE :
                request.setAttribute(AbstractEndpoint.KEY_SIZE_KEY,
-                                    new Integer(requestHeaderMessage.getInt()));
+                       Integer.valueOf(requestHeaderMessage.getInt()));
                break;
 
            case Constants.SC_A_STORED_METHOD:

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpMessage.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpMessage.java?rev=1043444&r1=1043443&r2=1043444&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpMessage.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpMessage.java Wed Dec  8 15:07:20 2010
@@ -147,17 +147,6 @@ public class AjpMessage {
 
     
     /**
-     * Append an int (4 bytes) to the message.
-     */
-    public void appendLongInt(int val) {
-        buf[pos++] = (byte) ((val >>> 24) & 0xFF);
-        buf[pos++] = (byte) ((val >>> 16) & 0xFF);
-        buf[pos++] = (byte) ((val >>> 8) & 0xFF);
-        buf[pos++] = (byte) (val & 0xFF);
-    }
-
-    
-    /**
      * Write a MessageBytes out at the current write position.
      * A null MessageBytes is encoded as a string with length 0.  
      */
@@ -318,12 +307,6 @@ public class AjpMessage {
     }
 
     
-    public byte peekByte() {
-        byte res = buf[pos];
-        return res;
-    }
-
-    
     public void getBytes(MessageBytes mb) {
         int length = getInt();
         if ((length == 0xFFFF) || (length == -1)) {
@@ -338,31 +321,6 @@ public class AjpMessage {
     
     
     /**
-     * Copy a chunk of bytes from the packet into an array and advance
-     * the read position past the chunk.  See appendBytes() for details
-     * on the encoding.
-     *
-     * @return The number of bytes copied.
-     */
-    public int getBytes(byte[] dest) {
-        int length = getInt();
-        if (pos + length > buf.length) {
-            log.error(sm.getString("ajpmessage.read", "" + length));
-            return 0;
-        }
-
-        if ((length == 0xFFFF) || (length == -1)) {
-            return 0;
-        }
-
-        System.arraycopy(buf, pos, dest, 0, length);
-        pos += length;
-        pos++; // Skip terminating \0
-        return length;
-    }
-
-    
-    /**
      * Read a 32 bits integer from packet, and advance the read position past
      * it.  Integers are encoded as four unsigned bytes with the
      * high-order byte first, and, as far as I can tell, in
@@ -444,7 +402,7 @@ public class AjpMessage {
         sb.append(" | ");
         for (int i = start; i < start + 16 && i < len + 4; i++) {
             if (!Character.isISOControl((char) buf[i])) {
-                sb.append(new Character((char) buf[i]));
+                sb.append(Character.valueOf((char) buf[i]));
             } else {
                 sb.append(".");
             }

Modified: tomcat/trunk/java/org/apache/coyote/ajp/Constants.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/Constants.java?rev=1043444&r1=1043443&r2=1043444&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/Constants.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/Constants.java Wed Dec  8 15:07:20 2010
@@ -238,7 +238,7 @@ public final class Constants {
             int i;
             for (i = 0; i < SC_RESP_AJP13_MAX; i++) {
                 responseTransHash.put(getResponseHeaderForCode(i),
-                                      new Integer(0xA001 + i));
+                        Integer.valueOf(0xA001 + i));
             }
         }
         catch (Exception e) {



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


Mime
View raw message