tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1519424 - in /tomcat/trunk/java/org/apache/coyote/ajp: AjpAprProcessor.java AjpNioProcessor.java AjpProcessor.java
Date Mon, 02 Sep 2013 13:02:03 GMT
Author: markt
Date: Mon Sep  2 13:02:03 2013
New Revision: 1519424

URL: http://svn.apache.org/r1519424
Log:
Clean-up.
Remove comments that add zero value.
Make spacing more consistent.

Modified:
    tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
    tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java
    tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java?rev=1519424&r1=1519423&r2=1519424&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java Mon Sep  2 13:02:03 2013
@@ -29,7 +29,6 @@ import org.apache.tomcat.util.net.AprEnd
 import org.apache.tomcat.util.net.SocketStatus;
 import org.apache.tomcat.util.net.SocketWrapper;
 
-
 /**
  * Processes AJP requests.
  *
@@ -43,18 +42,12 @@ import org.apache.tomcat.util.net.Socket
  */
 public class AjpAprProcessor extends AbstractAjpProcessor<Long> {
 
-
-    /**
-     * Logger.
-     */
     private static final Log log = LogFactory.getLog(AjpAprProcessor.class);
     @Override
     protected Log getLog() {
         return log;
     }
 
-    // ----------------------------------------------------------- Constructors
-
 
     public AjpAprProcessor(int packetSize, AprEndpoint endpoint) {
 
@@ -69,8 +62,6 @@ public class AjpAprProcessor extends Abs
     }
 
 
-    // ----------------------------------------------------- Instance Variables
-
     /**
      * Direct buffer used for input.
      */
@@ -83,8 +74,6 @@ public class AjpAprProcessor extends Abs
     protected final ByteBuffer outputBuffer;
 
 
-    // ----------------------------------------------------- ActionHook Methods
-
     /**
      * Send an action to the connector.
      *
@@ -112,8 +101,6 @@ public class AjpAprProcessor extends Abs
     }
 
 
-    // ------------------------------------------------------ Protected Methods
-
     @Override
     protected void setupSocket(SocketWrapper<Long> socketWrapper) {
         long socketRef = socketWrapper.getSocket().longValue();
@@ -330,7 +317,6 @@ public class AjpAprProcessor extends Abs
             inputBuffer.get(message.getBuffer(), headerLength, messageLength);
             return true;
         }
-
     }
 
 

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java?rev=1519424&r1=1519423&r2=1519424&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java Mon Sep  2 13:02:03 2013
@@ -31,24 +31,17 @@ import org.apache.tomcat.util.net.NioSel
 import org.apache.tomcat.util.net.SocketStatus;
 import org.apache.tomcat.util.net.SocketWrapper;
 
-
 /**
  * Processes AJP requests using NIO.
  */
 public class AjpNioProcessor extends AbstractAjpProcessor<NioChannel> {
 
-
-    /**
-     * Logger.
-     */
     private static final Log log = LogFactory.getLog(AjpNioProcessor.class);
     @Override
     protected Log getLog() {
         return log;
     }
 
-    // ----------------------------------------------------------- Constructors
-
 
     public AjpNioProcessor(int packetSize, NioEndpoint endpoint) {
 
@@ -60,16 +53,12 @@ public class AjpNioProcessor extends Abs
     }
 
 
-    // ----------------------------------------------------- Instance Variables
-
     /**
      * Selector pool for the associated endpoint.
      */
     protected final NioSelectorPool pool;
 
 
-    // ----------------------------------------------------- ActionHook Methods
-
     /**
      * Send an action to the connector.
      *
@@ -95,13 +84,12 @@ public class AjpNioProcessor extends Abs
         } else if (actionCode == ActionCode.ASYNC_DISPATCH) {
             if (asyncStateMachine.asyncDispatch()) {
                 ((NioEndpoint)endpoint).dispatchForEvent(
-                        socketWrapper.getSocket(), SocketStatus.OPEN_READ, true);       
    }
+                        socketWrapper.getSocket(), SocketStatus.OPEN_READ, true);
             }
         }
+    }
 
 
-    // ------------------------------------------------------ Protected Methods
-
     @Override
     protected void setupSocket(SocketWrapper<NioChannel> socketWrapper)
             throws IOException {
@@ -135,15 +123,17 @@ public class AjpNioProcessor extends Abs
         Selector selector = null;
         try {
             selector = pool.get();
-        } catch ( IOException x ) {
+        } catch (IOException x) {
             //ignore
         }
         try {
             pool.write(writeBuffer, socketWrapper.getSocket(), selector,
                     writeTimeout, true);
-        }finally {
+        } finally {
             writeBuffer.clear();
-            if ( selector != null ) pool.put(selector);
+            if (selector != null) {
+                pool.put(selector);
+            }
         }
     }
 
@@ -172,6 +162,7 @@ public class AjpNioProcessor extends Abs
         return read;
     }
 
+
     private int readSocket(byte[] buf, int pos, int n, boolean block)
             throws IOException {
         int nRead = 0;
@@ -257,6 +248,4 @@ public class AjpNioProcessor extends Abs
             return true;
         }
     }
-
-
 }

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java?rev=1519424&r1=1519423&r2=1519424&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java Mon Sep  2 13:02:03 2013
@@ -28,7 +28,6 @@ import org.apache.tomcat.util.net.JIoEnd
 import org.apache.tomcat.util.net.SocketStatus;
 import org.apache.tomcat.util.net.SocketWrapper;
 
-
 /**
  * Processes AJP requests.
  *
@@ -42,18 +41,12 @@ import org.apache.tomcat.util.net.Socket
  */
 public class AjpProcessor extends AbstractAjpProcessor<Socket> {
 
-
-    /**
-     * Logger.
-     */
     private static final Log log = LogFactory.getLog(AjpProcessor.class);
     @Override
     protected Log getLog() {
         return log;
     }
 
-    // ----------------------------------------------------------- Constructors
-
 
     public AjpProcessor(int packetSize, JIoEndpoint endpoint) {
 
@@ -63,22 +56,11 @@ public class AjpProcessor extends Abstra
     }
 
 
-    // ----------------------------------------------------- Instance Variables
-
-    /**
-     * Input stream.
-     */
     protected InputStream input;
 
-
-    /**
-     * Output stream.
-     */
     protected OutputStream output;
 
 
-    // --------------------------------------------------------- Public Methods
-
     @Override
     public void recycle(boolean socketClosing) {
         super.recycle(socketClosing);
@@ -88,8 +70,6 @@ public class AjpProcessor extends Abstra
         }
     }
 
-    // ----------------------------------------------------- ActionHook Methods
-
 
     /**
      * Send an action to the connector.
@@ -119,8 +99,6 @@ public class AjpProcessor extends Abstra
     }
 
 
-    // ------------------------------------------------------ Protected Methods
-
     @Override
     protected void setupSocket(SocketWrapper<Socket> socketWrapper)
             throws IOException {
@@ -162,7 +140,6 @@ public class AjpProcessor extends Abstra
         }
 
         return true;
-
     }
 
 



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


Mime
View raw message