Fixed: Duplicate entries in paramWithSuffix

(OFBIZ-11056)

when using string-list-suffix attribute for service definition, invoke method 
(from associated event handler) will try to parse parameters from both request 
variable and rawParameterMap which was also built from request. 
So we end up with duplicates in resulting list.

This behaviour seems to be introduced with OFBIZ-5048.


Thanks: Samuel Trégouët for report and fix 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859972 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacques Le Roux
2019-05-25 14:08:48 +00:00
parent c26b16a5ee
commit 402db94e61
2 changed files with 9 additions and 5 deletions
@@ -161,13 +161,15 @@ public final class UtilHttp {
paramMap.putAll(getPathInfoOnlyParameterMap(request, nameSet, onlyIncludeOrSkip));
Map<String, Object> multiPartMap = new HashMap<>();
if (paramMap.size() == 0) {
// nothing found in the parameters; maybe we read the stream instead
Map<String, Object> multiPartMap = getMultiPartParameterMap(request);
multiPartMap = getMultiPartParameterMap(request);
if (UtilValidate.isNotEmpty(multiPartMap)) {
paramMap.putAll(multiPartMap);
}
}
request.setAttribute("multiPartMap", multiPartMap);
if (Debug.verboseOn()) {
Debug.logVerbose("Made Request Parameter Map with [" + paramMap.size() + "] Entries", module);
@@ -282,7 +284,6 @@ public final class UtilHttp {
}
}
return multiPartMap;
}