activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1055983 - /activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
Date Thu, 06 Jan 2011 18:16:54 GMT
Author: chirino
Date: Thu Jan  6 18:16:54 2011
New Revision: 1055983

URL: http://svn.apache.org/viewvc?rev=1055983&view=rev
Log:
fixes an NPE

Modified:
    activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala

Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala?rev=1055983&r1=1055982&r2=1055983&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
Thu Jan  6 18:16:54 2011
@@ -563,8 +563,10 @@ class StompProtocolHandler extends Proto
       val outbound_heart_beat_header = ascii("%d,%d".format(outbound_heartbeat,inbound_heartbeat))
       connected_headers += HEART_BEAT->outbound_heart_beat_header
 
-      host.authenticator.user_name(security_context).foreach{ name=>
-        connected_headers += USER_ID->encode_header(name)
+      if( host.authenticator!=null ) {
+        host.authenticator.user_name(security_context).foreach{ name=>
+          connected_headers += USER_ID->encode_header(name)
+        }
       }
 
       connection_sink.offer(StompFrame(CONNECTED,connected_headers.toList))



Mime
View raw message