Author: jgomes
Date: Wed Feb 11 17:23:24 2009
New Revision: 743412
URL: http://svn.apache.org/viewvc?rev=743412&view=rev
Log:
Apply patch submitted by Allan Schrum. Thanks, Allan!
Fixes [AMQNET-135]. (See https://issues.apache.org/activemq/browse/AMQNET-135)
Modified:
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/URISupport.cs
Modified:
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/URISupport.cs
URL:
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/URISupport.cs?rev=743412&r1=743411&r2=743412&view=diff
==============================================================================
---
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/URISupport.cs
(original)
+++
activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/URISupport.cs
Wed Feb 11 17:23:24 2009
@@ -282,15 +282,19 @@
// tcp://192.168.1.1:61616/
// tcp://machine:61616
// tcp://host:61616/
- //
failover://host/path(tcp://192.168.1.1:61616?trace=true,tcp://machine:61616?trace=false)?random=true
+ //
failover:(tcp://192.168.1.1:61616?trace=true,tcp://machine:61616?trace=false)?random=true
- // If this is a composite URI, then strip the scheme
and "//"
+ // If this is a composite URI, then strip the scheme
// and break up the URI into components. If not, then
pass the URI directly.
// We detect "compositeness" by the existence of a "("
in the URI containing
// balanced parenthesis
// Start with original URI
- String ssp = uri.AbsoluteUri.Trim();
+#if NET_1_0 || NET_1_1
+ String ssp = uri.AbsoluteUri.Trim();
+#else
+ String ssp = uri.OriginalString.Trim();
+#endif
// If balanced and existing, assume composite
if(checkParenthesis(ssp) && ssp.IndexOf("(") >= 0)
@@ -298,7 +302,6 @@
// Composite
ssp = stripPrefix(ssp, rc.Scheme).Trim();
ssp = stripPrefix(ssp, ":").Trim();
- ssp = stripPrefix(ssp, "//").Trim();
}
else
{
@@ -418,7 +421,7 @@
case ',':
if(depth == 0)
{
- String s =
componentString.Substring(last, i);
+ String s =
componentString.Substring(last, i - last);
l.Add(s);
last = i + 1;
}