activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1057586 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java
Date Tue, 11 Jan 2011 11:34:55 GMT
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);



Mime
View raw message