Author: markt Date: Tue Aug 7 19:10:25 2012 New Revision: 1370436 URL: http://svn.apache.org/viewvc?rev=1370436&view=rev Log: FindBugs: Ignore exceptions We are ignoring them and this is fine. Stop FindBugs complaining (a comment is sufficient)
Modified: tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioSender.java Modified: tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioSender.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioSender.java?rev=1370436&r1=1370435&r2=1370436&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioSender.java (original) +++ tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioSender.java Tue Aug 7 19:10:25 2012 @@ -266,27 +266,43 @@ public class NioSender extends AbstractS try { connecting = false; setConnected(false); - if ( socketChannel != null ) { + if (socketChannel != null) { try { - try {socketChannel.socket().close();}catch ( Exception x){} + try { + socketChannel.socket().close(); + } catch (Exception x) { + // Ignore + } //error free close, all the way //try {socket.shutdownOutput();}catch ( Exception x){} //try {socket.shutdownInput();}catch ( Exception x){} //try {socket.close();}catch ( Exception x){} - try {socketChannel.close();}catch ( Exception x){} - }finally { + try { + socketChannel.close(); + } catch (Exception x) { + // Ignore + } + } finally { socketChannel = null; } } - if ( dataChannel != null ) { + if (dataChannel != null) { try { - try {dataChannel.socket().close();}catch ( Exception x){} + try { + dataChannel.socket().close(); + } catch (Exception x) { + // Ignore + } //error free close, all the way //try {socket.shutdownOutput();}catch ( Exception x){} //try {socket.shutdownInput();}catch ( Exception x){} //try {socket.close();}catch ( Exception x){} - try {dataChannel.close();}catch ( Exception x){} - }finally { + try { + dataChannel.close(); + } catch (Exception x) { + // Ignore + } + } finally { dataChannel = null; } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org