-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
HttpServletRequest.getParameterMap - UnmodifiableMap does not wrap a jetty MultiMap #12578
Comments
In Jetty 12, the The There's no |
We cannot fix the |
But we can override toString when we create the linked hash map in org.eclipse.jetty.util.Fields#toStringArrayMap, which I think will be enough.... let me have a play as I like good toString implementations |
Fix #12578 pretty print getParameterMap Added test for parameters
@mreiterer see #12585 |
@gregw Thanks ! |
Fix #12578 pretty print getParameterMap checkstyle
Fix #12578 pretty print getParameterMap Added TypeUtil method
Jetty version(s)
Jetty 12
Jetty Environment
ee10
Java version/vendor
(use: java -version)
openjdk 21.0.3 2024-04-16 LTS
OpenJDK Runtime Environment Temurin-21.0.3+9 (build 21.0.3+9-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (build 21.0.3+9-LTS, mixed mode)
OS type/version
MacOS
Description
Jetty 11 behaviour:
Map<String, String[]> parameterMap = request.getParameterMap();
parameterMap is of type: java.util.Collections$UnmodifiableMap, wraps a org.eclipse.jetty.util.MultiMap
Calling toString (or directly hand the map over to a slf4j / logback) on parameterMap delivers a pretty printed represenation of the multi value map.
Sample output: params: {param1=[abc, def],param2=[xzy]}
Jetty 12 behaviour:
Map<String, String[]> parameterMap = request.getParameterMap();
parameterMap is of type: java.util.Collections$UnmodifiableMap, wraps a java.util.LinkedHashMap
Calling toString on parameterMap delivers eg:
{param1=[Ljava.lang.String;@5738c092, param2=[Ljava.lang.String;@7f038407}
Question
Is this an intentional change ?
The text was updated successfully, but these errors were encountered: