Commit ff82fdaa authored by Karsten Loesing's avatar Karsten Loesing
Browse files

Use parameterized map for parameters.

parent ed9c9f34
......@@ -20,8 +20,7 @@ public class HttpServletRequestWrapper {
return this.request.getRequestURI();
}
@SuppressWarnings("rawtypes")
protected Map getParameterMap() {
protected Map<String, String[]> getParameterMap() {
return this.request.getParameterMap();
}
......
......@@ -133,10 +133,10 @@ public class ResourceServlet extends HttpServlet {
/* Extract parameters either from the old-style URI or from request
* parameters. */
Map<String, String> parameterMap = new HashMap<>();
for (Object parameterKey : request.getParameterMap().keySet()) {
for (String parameterKey : request.getParameterMap().keySet()) {
String[] parameterValues =
request.getParameterValues((String) parameterKey);
parameterMap.put((String) parameterKey, parameterValues[0]);
request.getParameterValues(parameterKey);
parameterMap.put(parameterKey, parameterValues[0]);
}
/* Make sure that the request doesn't contain any unknown
......
......@@ -64,8 +64,7 @@ public class ResourceServletTest {
return this.requestUri;
}
@SuppressWarnings("rawtypes")
protected Map getParameterMap() {
protected Map<String, String[]> getParameterMap() {
return this.parameterMap;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment