[Bug 373162] add improved implementation for getParameterMap(), needs a test though and the existing setup doesn't seem like it would easily support the needed test so need to do that still

This commit is contained in:
Jesse McConnell 2012-03-02 17:31:08 -06:00
parent a7bc2b5863
commit f434acd6ba
1 changed files with 9 additions and 1 deletions

View File

@ -27,6 +27,7 @@ import java.io.UnsupportedEncodingException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -460,7 +461,14 @@ public class MultiPartFilter implements Filter
@Override @Override
public Map getParameterMap() public Map getParameterMap()
{ {
return Collections.unmodifiableMap(_params.toStringArrayMap()); Map<String, String> cmap = new HashMap<String,String>();
for ( Object key : _params.keySet() )
{
cmap.put((String)key,getParameter((String)key));
}
return Collections.unmodifiableMap(cmap);
} }
/* ------------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------------- */