tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoli...@apache.org
Subject svn commit: r1196827 - /tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
Date Wed, 02 Nov 2011 22:09:43 GMT
Author: kkolinko
Date: Wed Nov  2 22:09:42 2011
New Revision: 1196827

URL: http://svn.apache.org/viewvc?rev=1196827&view=rev
Log:
Wrap and format long lines. No functional change.

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1196827&r1=1196826&r2=1196827&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Wed Nov  2 22:09:42 2011
@@ -564,7 +564,10 @@ public class NioEndpoint extends Abstrac
                 pollers[i].destroy();
                 pollers[i] = null;
             }
-            try { stopLatch.await(selectorTimeout+100,TimeUnit.MILLISECONDS); } catch (InterruptedException
ignore ) {}
+            try {
+                stopLatch.await(selectorTimeout + 100, TimeUnit.MILLISECONDS);
+            } catch (InterruptedException ignore) {
+            }
         }
         eventCache.clear();
         keyCache.clear();
@@ -1272,7 +1275,10 @@ public class NioEndpoint extends Abstrac
                         log.debug("Send file complete for:"+sd.fileName);
                     }
                     attachment.setSendfileData(null);
-                    try {sd.fchannel.close();}catch(Exception ignore){}
+                    try {
+                        sd.fchannel.close();
+                    } catch (Exception ignore) {
+                    }
                     if ( sd.keepAlive ) {
                         if (reg) {
                             if (log.isDebugEnabled()) {
@@ -1409,9 +1415,23 @@ public class NioEndpoint extends Abstrac
             error = false;
             lastRegistered = 0;
             sendfileData = null;
-            if ( readLatch!=null ) try {for (int i=0; i<(int)readLatch.getCount();i++)
readLatch.countDown();}catch (Exception ignore){}
+            if (readLatch != null) {
+                try {
+                    for (int i = 0; i < (int) readLatch.getCount(); i++) {
+                        readLatch.countDown();
+                    }
+                } catch (Exception ignore) {
+                }
+            }
             readLatch = null;
-            if ( writeLatch!=null ) try {for (int i=0; i<(int)writeLatch.getCount();i++)
writeLatch.countDown();}catch (Exception ignore){}
+            if (writeLatch != null) {
+                try {
+                    for (int i = 0; i < (int) writeLatch.getCount(); i++) {
+                        writeLatch.countDown();
+                    }
+                } catch (Exception ignore) {
+                }
+            }
             writeLatch = null;
             cometNotify = false;
             cometOps = SelectionKey.OP_READ;



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


Mime
View raw message