Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 30847 invoked from network); 6 Sep 2005 13:09:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Sep 2005 13:09:36 -0000 Received: (qmail 26613 invoked by uid 500); 6 Sep 2005 13:09:31 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 26539 invoked by uid 500); 6 Sep 2005 13:09:30 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 26274 invoked by uid 99); 6 Sep 2005 13:09:28 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2005 06:09:28 -0700 Received: by ajax.apache.org (Postfix, from userid 99) id 31CE6353; Tue, 6 Sep 2005 15:09:26 +0200 (CEST) From: bugzilla@apache.org To: commons-dev@jakarta.apache.org Subject: DO NOT REPLY [Bug 36519] New: - Scaffold: bug in function ConvertUtils.addParams(String path, Map parameters) X-Bugzilla-Reason: AssignedTo Message-Id: <20050906130926.31CE6353@ajax.apache.org> Date: Tue, 6 Sep 2005 15:09:26 +0200 (CEST) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=36519 Summary: Scaffold: bug in function ConvertUtils.addParams(String path, Map parameters) Product: Commons Version: unspecified Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Sandbox AssignedTo: commons-dev@jakarta.apache.org ReportedBy: stefano.bertini@plangroup.it I found a bug in function public static String addParams(String path, Map parameters) in class org.apache.commons.scaffold.text.ConvertUtils When adding multiple parameters, the function doesn't insert the "&" between each parameter. I modified in this way the function public static String addParams(String path, Map parameters) { if (null==path) path = new String(); if ((null==parameters) || (parameters.isEmpty())) return path; StringBuffer uri = new StringBuffer(path); boolean isQuery = (path.indexOf(QS_START)>=0); if (isQuery) uri.append(QS_DELIM); else uri.append(QS_START); Set entries = parameters.entrySet(); for (Iterator i = entries.iterator(); i.hasNext(); ) { Entry e = (Entry) i.next(); uri.append(e.getKey()); uri.append(QS_SEP); uri.append(e.getValue()); if (i.hasNext()) { // *** PATCH *** uri.append(QS_DELIM); // *** PATCH *** } // *** PATCH *** } return uri.toString(); } -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org