You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2013/11/17 22:57:55 UTC
svn commit: r1542844 -
/tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawboardEndpoint.java
Author: markt
Date: Sun Nov 17 21:57:55 2013
New Revision: 1542844
URL: http://svn.apache.org/r1542844
Log:
Fix FindBugs warning
Use separate catch blocks when different actions are required for different exceptions
Modified:
tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawboardEndpoint.java
Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawboardEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawboardEndpoint.java?rev=1542844&r1=1542843&r2=1542844&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawboardEndpoint.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawboardEndpoint.java Sun Nov 17 21:57:55 2013
@@ -208,13 +208,14 @@ public final class DrawboardEndpoint ext
break;
}
-
- } catch (RuntimeException|ParseException ex) {
+ } catch (ParseException e) {
+ // Client sent invalid data
+ // Ignore, TODO: maybe close connection
+ } catch (RuntimeException e) {
// Client sent invalid data.
// Ignore, TODO: maybe close connection
- if (dontSwallowException
- && ex instanceof RuntimeException) {
- throw (RuntimeException) ex;
+ if (dontSwallowException) {
+ throw e;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org