rmcdouga commented on a change in pull request #6: Added support for simulating
HTML forms (including file uploads)…
URL:
https://github.com/apache/sling-org-apache-sling-servlet-helpers/pull/6#discussion_r288219155
##########
File path:
src/main/java/org/apache/sling/servlethelpers/MockSlingHttpServletRequest.java
##########
@@ -82,7 +83,7 @@
private final ResourceResolver resourceResolver;
private final RequestPathInfo requestPathInfo;
private Map<String, Object> attributeMap = new HashMap<String, Object>();
- private Map<String, String[]> parameterMap = new LinkedHashMap<String,
String[]>();
+ private Map<String, MockRequestParameter[]> parameterMap = new
LinkedHashMap<>();
Review comment:
I wondered about this too. The MockRequestParameterMap uses a HashMap while
this class uses a LinkedHashMap. I was afraid to change that since I wasn't
sure if ordering of parameters is important (I haven't looked at the Sling code
to see what kind of behaviour it has). My assumption was that the original
author chose a LinkedHashMap over HashMap for a reason. Do you have any idea
on why? If I implemented this, should I make the MockRequestParameterMap use a
LinkedHashMap instead?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services