Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 90943 invoked from network); 19 Jul 2010 20:43:14 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Jul 2010 20:43:14 -0000 Received: (qmail 36051 invoked by uid 500); 19 Jul 2010 20:43:14 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 35990 invoked by uid 500); 19 Jul 2010 20:43:14 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 35983 invoked by uid 99); 19 Jul 2010 20:43:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jul 2010 20:43:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jul 2010 20:43:11 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7E5AB2388999; Mon, 19 Jul 2010 20:41:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r965622 - /activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/URISupport.cs Date: Mon, 19 Jul 2010 20:41:48 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100719204148.7E5AB2388999@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 /// /// The query string to parse. This string should not contain /// Uri escape characters. - 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("?")) {