You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2011/01/06 19:16:54 UTC
svn commit: r1055983 -
/activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
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))