activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r965622 - /activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/URISupport.cs
Date Mon, 19 Jul 2010 20:41:48 GMT
Author: tabish
Date: Mon Jul 19 20:41:48 2010
New Revision: 965622

URL: http://svn.apache.org/viewvc?rev=965622&view=rev
Log:
Makes the ParseQuery method a bit more tolerant of bad input.

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=965622&r1=965621&r2=965622&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 Mon Jul 19
20:41:48 2010
@@ -56,10 +56,15 @@ namespace Apache.NMS.Util
         /// </summary>
         /// <param name="query">The query string to parse. This string should not contain
         /// Uri escape characters.</param>
-        public static StringDictionary ParseQuery(string query)
+        public static StringDictionary ParseQuery(String query)
         {
             StringDictionary map = new StringDictionary();
 
+            if(String.IsNullOrEmpty(query))
+            {
+                return EmptyMap;
+            }
+			
             // strip the initial "?"
             if(query.StartsWith("?"))
             {



Mime
View raw message