Author: violetagg
Date: Mon Jul 22 14:26:57 2013
New Revision: 1505689
URL: http://svn.apache.org/r1505689
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55291
Avoid NPE when registering a session. Patch provided by rstoyanchev.
Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java?rev=1505689&r1=1505688&r2=1505689&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
Mon Jul 22 14:26:57 2013
@@ -347,7 +347,7 @@ public class WsServerContainer extends W
private void registerAuthenticatedSession(WsSession wsSession,
String httpSessionId) {
Set<WsSession> wsSessions = authenticatedSessions.get(httpSessionId);
- if (wsSession == null) {
+ if (wsSessions == null) {
wsSessions = Collections.newSetFromMap(
new ConcurrentHashMap<WsSession,Boolean>());
authenticatedSessions.putIfAbsent(httpSessionId, wsSessions);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]