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 {
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);