From: Juergen H. <jho...@us...> - 2008-11-20 23:33:28
|
Update of /cvsroot/springframework/spring/src/org/springframework/web/util In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30961/src/org/springframework/web/util Modified Files: WebUtils.java Log Message: WebUtils.findParameterValue needs to deal with String array values in the given Map Index: WebUtils.java =================================================================== RCS file: /cvsroot/springframework/spring/src/org/springframework/web/util/WebUtils.java,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** WebUtils.java 2 Sep 2008 12:09:31 -0000 1.48 --- WebUtils.java 20 Nov 2008 23:33:21 -0000 1.49 *************** *** 563,569 **** public static String findParameterValue(Map parameters, String name) { // First try to get it as a normal name=value parameter ! String value = (String) parameters.get(name); ! if (value != null) { ! return value; } // If no value yet, try to get it as a name_value=xyz parameter --- 563,573 ---- public static String findParameterValue(Map parameters, String name) { // First try to get it as a normal name=value parameter ! Object value = parameters.get(name); ! if (value instanceof String[]) { ! String[] values = (String[]) value; ! return (values.length > 0 ? values[0] : null); ! } ! else if (value != null) { ! return value.toString(); } // If no value yet, try to get it as a name_value=xyz parameter |