Author: kkolinko
Date: Sun Oct 25 17:32:49 2015
New Revision: 1710466

URL: http://svn.apache.org/viewvc?rev=1710466&view=rev
Log:
CTR. Apply auto-formatting to try/catch blocks to simplify comparison with 
Tomcat 7 code. No functional change.

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=1710466&r1=1710465&r2=1710466&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 Sun 
Oct 25 17:32:49 2015
@@ -1555,9 +1555,24 @@ public class NioEndpoint extends Abstrac
                 key.attach(null);
                 if (ka!=null) handler.release(ka.getChannel());
                 if (key.isValid()) key.cancel();
-                if (key.channel().isOpen()) try {key.channel().close();}catch 
(Exception ignore){}
-                try {if (ka!=null) ka.channel.close(true);}catch (Exception 
ignore){}
-                try {if (ka!=null && ka.getSendfileData()!=null && 
ka.getSendfileData().fchannel!=null && ka.getSendfileData().fchannel.isOpen()) 
ka.getSendfileData().fchannel.close();}catch (Exception ignore){}
+                if (key.channel().isOpen()) {
+                    try {
+                        key.channel().close();
+                    } catch (Exception ignore) {
+                    }
+                }
+                try {
+                    if (ka != null)
+                        ka.channel.close(true);
+                } catch (Exception ignore) {
+                }
+                try {
+                    if (ka != null && ka.getSendfileData() != null
+                            && ka.getSendfileData().fchannel != null
+                            && ka.getSendfileData().fchannel.isOpen())
+                        ka.getSendfileData().fchannel.close();
+                } catch (Exception ignore) {
+                }
                 if (ka!=null) ka.reset();
             } catch (Throwable e) {
                 if ( log.isDebugEnabled() ) log.error("",e);



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

Reply via email to