Looking at: public static Map ensureParamsAreStringArrays(Map<String, Object> params) { Map<String, String[]> result = null; if (params != null) { result = new LinkedHashMap<String, String[]>(params.size()); Iterator<Map.Entry<String, Object>> it = params.entrySet().iterator(); while (it.hasNext()) { Map.Entry<String, Object> entry = it.next(); Object val = entry.getValue(); if (val==null) { // result.put(entry.getKey(),null); // or // result.put(entry.getKey(),new String[]{}); // or // result.put(entry.getKey(),new String[]{""}); // or // result.put(entry.getKey(),new String[]{null}); } else if (val instanceof String[]) { result.put(entry.getKey(), (String[])val); } else { result.put(entry.getKey(), new String[] { val.toString() }); } } } return result; }
Looging at http://portals.apache.org/pluto/portlet-2.0-apidocs/javax/portlet/BaseURL.html#s etParameters(java.util.Map), which is the intended consumer of the output from this method it is not clear. But looking at http://portals.apache.org/pluto/portlet-2.0-apidocs/javax/portlet/BaseURL.html#s etParameter(java.lang.String,%20java.lang.String), it is looking like result.put(entry.getKey(),null) would be valid and proper. If we don't want the paramter to be removed then result.put(entry.getKey(),new String[]{""}) would be the best course of action. https://issues.apache.org/jira/browse/WW-3606 -Jason -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100 - - +1 (443) 269-1555 x333 Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org For additional commands, e-mail: dev-h...@struts.apache.org