[ http://jira.codehaus.org/browse/DISPL-228?page=all ] fabrizio giustina closed DISPL-228: -----------------------------------
Resolution: Fixed Fix Version: 1.1 request.getParameterValues() should not return null, but an empty array. Anyway, I added the check to be sure that the error will not occur. Please post a valid test that can reproduce the problem, if possible. > DefaultRequestHelper fails with Null parameter > ---------------------------------------------- > > Key: DISPL-228 > URL: http://jira.codehaus.org/browse/DISPL-228 > Project: DisplayTag > Type: Bug > Versions: 1.0 > Fix For: 1.1 > > > DefaultRequestHelper fails when request parameter values are set to Null. > Code change recommended: > From: > // put key/value in the map > String[] originalValues = this.request.getParameterValues(paramName); > String[] values = new String[originalValues.length]; > for (int i = 0; i < values.length; i++) > { > values[i] = > CompatibleUrlEncoder.encode(StringUtils.defaultString(originalValues[i]), > response > .getCharacterEncoding()); > } > map.put(paramName, values); > To: > // put key/value in the map > String[] originalValues = this.request.getParameterValues(paramName); > if (originalValues==null) > { > originalValues = new String[] {""}; > } > String[] values = new String[originalValues.length]; > for (int i = 0; i < values.length; i++) > { > values[i] = > CompatibleUrlEncoder.encode(StringUtils.defaultString(originalValues[i]), > response > .getCharacterEncoding()); > } > map.put(paramName, values); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ displaytag-devel mailing list displaytag-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/displaytag-devel