https://issues.apache.org/jira/browse/AMQ-3124 - Failover transport client gets corrupted connectedBrokers data - additional null check, for advisory broker use case

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1057586 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2011-01-11 11:34:54 +00:00
parent 0ed0ba584c
commit 5ca9763343
1 changed files with 9 additions and 6 deletions

View File

@ -255,13 +255,16 @@ public class TransportConnector implements Connector, BrokerServiceAware {
} }
public String getPublishableConnectString() throws Exception { public String getPublishableConnectString() throws Exception {
String publishableConnectString = null;
URI theConnectURI = getConnectUri(); URI theConnectURI = getConnectUri();
String publishableConnectString = theConnectURI.toString(); if (theConnectURI != null) {
// strip off server side query parameters which may not be compatible to publishableConnectString = theConnectURI.toString();
// clients // strip off server side query parameters which may not be compatible to
if (theConnectURI.getRawQuery() != null) { // clients
publishableConnectString = publishableConnectString.substring(0, publishableConnectString if (theConnectURI.getRawQuery() != null) {
.indexOf(theConnectURI.getRawQuery()) - 1); publishableConnectString = publishableConnectString.substring(0, publishableConnectString
.indexOf(theConnectURI.getRawQuery()) - 1);
}
} }
if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) {
LOG.debug("Publishing: " + publishableConnectString + " for broker transport URI: " + theConnectURI); LOG.debug("Publishing: " + publishableConnectString + " for broker transport URI: " + theConnectURI);