Author: markt
Date: Wed Jan 4 13:58:15 2017
New Revision: 1777315
URL: http://svn.apache.org/viewvc?rev=1777315&view=rev
Log:
Back-port reformatting to simplify following back-ports
Modified:
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1777315&r1=1777314&r2=1777315&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Wed
Jan 4 13:58:15 2017
@@ -998,7 +998,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();
@@ -1833,7 +1836,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) {
+ }
// For calls from outside the Poller, the caller is
// responsible for registering the socket for the
// appropriate event(s) if sendfile completes.
@@ -1957,9 +1963,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: [email protected]
For additional commands, e-mail: [email protected]