Author: markt Date: Sat Feb 16 17:36:48 2013 New Revision: 1446917 URL: http://svn.apache.org/r1446917 Log: Fix a couple of logging TODOs
Modified: tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties?rev=1446917&r1=1446916&r2=1446917&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Sat Feb 16 17:36:48 2013 @@ -42,9 +42,11 @@ wsRemoteEndpoint.inProgress=Message will # Messages are encoded using UTF-8 where a single character may be encoded in # as many as 4 bytes. wsSession.timeout=The WebSocket session timeout expired + wsSession.duplicateHandlerBinary=A binary message handler has already been configured wsSession.duplicateHandlerPong=A pong message handler has already been configured wsSession.duplicateHandlerText=A text message handler has already been configured +wsSession.expireFailed=Unable to close expired session cleanly wsSession.invalidHandlerTypePong=A pong message handler must implement MessageHandler.Basic wsSession.removeHandlerFailed=Unable to remove the handler [{0}] as it was not registered with this session wsSession.unknownHandler=Unable to add the message handler [{0}] as it was for the unrecognised type [{1}] Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java?rev=1446917&r1=1446916&r2=1446917&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java Sat Feb 16 17:36:48 2013 @@ -41,6 +41,8 @@ import javax.websocket.RemoteEndpoint; import javax.websocket.Session; import javax.websocket.WebSocketContainer; +import org.apache.juli.logging.Log; +import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.res.StringManager; public class WsSession implements Session { @@ -49,6 +51,8 @@ public class WsSession implements Sessio private static final StringManager sm = StringManager.getManager(Constants.PACKAGE_NAME); + private final Log log = LogFactory.getLog(WsSession.class); + private final Endpoint localEndpoint; private final WsRemoteEndpointBase wsRemoteEndpoint; private final ClassLoader applicationClassLoader; @@ -394,7 +398,7 @@ public class WsSession implements Sessio close(new CloseReason(CloseCodes.GOING_AWAY, sm.getString("wsSession.timeout"))); } catch (IOException e) { - // TODO Log this? + log.warn(sm.getString("wsSession.expireFailed"), e); } } } @@ -446,7 +450,7 @@ public class WsSession implements Sessio superClassType.getActualTypeArguments()[ ((Integer) result).intValue()]); } else { - // TODO: Something went wrong. Log an error. + // Error will be logged further up the call stack return null; } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org