activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1309507 - /activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connection.scala
Date Wed, 04 Apr 2012 18:07:46 GMT
Author: chirino
Date: Wed Apr  4 18:07:45 2012
New Revision: 1309507

URL: http://svn.apache.org/viewvc?rev=1309507&view=rev
Log:
 Fixes APLO-181: java.lang.NullPointerException when using the UDP connector

Modified:
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connection.scala

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connection.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connection.scala?rev=1309507&r1=1309506&r2=1309507&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connection.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connection.scala
Wed Apr  4 18:07:45 2012
@@ -155,8 +155,8 @@ class BrokerConnection(var connector: Co
     result.state_since = service_state.since
     result.protocol = protocol_handler.protocol
     result.connector = connector.id
-    result.remote_address = transport.getRemoteAddress.toString
-    result.local_address = transport.getLocalAddress.toString
+    result.remote_address = Option(transport.getRemoteAddress).map(_.toString).getOrElse(null)
+    result.local_address = Option(transport.getLocalAddress).map(_.toString).getOrElse(null)
     result.protocol_session_id = protocol_handler.session_id.getOrElse(null)
     val wf = transport.getProtocolCodec
     if( wf!=null ) {



Mime
View raw message