You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2011/01/11 12:34:55 UTC
svn commit: r1057586 -
/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java
Author: gtully
Date: Tue Jan 11 11:34:54 2011
New Revision: 1057586
URL: http://svn.apache.org/viewvc?rev=1057586&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3124 - Failover transport client gets corrupted connectedBrokers data - additional null check, for advisory broker use case
Modified:
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java?rev=1057586&r1=1057585&r2=1057586&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java Tue Jan 11 11:34:54 2011
@@ -255,13 +255,16 @@ public class TransportConnector implemen
}
public String getPublishableConnectString() throws Exception {
+ String publishableConnectString = null;
URI theConnectURI = getConnectUri();
- String publishableConnectString = theConnectURI.toString();
- // strip off server side query parameters which may not be compatible to
- // clients
- if (theConnectURI.getRawQuery() != null) {
- publishableConnectString = publishableConnectString.substring(0, publishableConnectString
- .indexOf(theConnectURI.getRawQuery()) - 1);
+ if (theConnectURI != null) {
+ publishableConnectString = theConnectURI.toString();
+ // strip off server side query parameters which may not be compatible to
+ // clients
+ if (theConnectURI.getRawQuery() != null) {
+ publishableConnectString = publishableConnectString.substring(0, publishableConnectString
+ .indexOf(theConnectURI.getRawQuery()) - 1);
+ }
}
if (LOG.isDebugEnabled()) {
LOG.debug("Publishing: " + publishableConnectString + " for broker transport URI: " + theConnectURI);