activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r943860 - in /activemq/trunk/activemq-core/src: main/java/org/apache/activemq/util/URISupport.java test/java/org/apache/activemq/transport/failover/FailoverUriTest.java
Date Thu, 13 May 2010 10:09:44 GMT
Author: dejanb
Date: Thu May 13 10:09:44 2010
New Revision: 943860

URL: http://svn.apache.org/viewvc?rev=943860&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQ-2729 - failover uri query parsing

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/URISupport.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverUriTest.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/URISupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/URISupport.java?rev=943860&r1=943859&r2=943860&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/URISupport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/URISupport.java Thu
May 13 10:09:44 2010
@@ -103,6 +103,7 @@ public class URISupport {
 
     public static Map<String, String> parseQuery(String uri) throws URISyntaxException
{
         try {
+            uri = uri.substring(uri.lastIndexOf("?") + 1); // get only the relevant part
of the query
             Map<String, String> rc = new HashMap<String, String>();
             if (uri != null) {
                 String[] parameters = uri.split("&");

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverUriTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverUriTest.java?rev=943860&r1=943859&r2=943860&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverUriTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverUriTest.java
Thu May 13 10:09:44 2010
@@ -23,7 +23,7 @@ import org.apache.activemq.transport.tcp
 public class FailoverUriTest extends TransportUriTest {
 	
     public void initCombosForTestUriOptionsWork() {
-		addCombinationValues("prefix", new Object[] {"failover:("});
+		addCombinationValues("prefix", new Object[] {"failover:(", "failover://("});
 		addCombinationValues("postfix", new Object[] {")?initialReconnectDelay=1000&maxReconnectDelay=1000"
 				, "?wireFormat.tightEncodingEnabled=false)?jms.useAsyncSend=true&jms.copyMessageOnSend=false"
 				, "?wireFormat.maxInactivityDuration=0&keepAlive=true)?jms.prefetchPolicy.all=500&initialReconnectDelay=10000&useExponentialBackOff=false&maxReconnectAttempts=0&randomize=false"});



Mime
View raw message