Skip to content

Commit

Permalink
Improved: Inline one ‘UtilHttp#getPathInfoOnlyParameterMap’ overload
Browse files Browse the repository at this point in the history
(OFBIZ-11138)

‘getPathInfoOnlyParameterMap(HttpServletRequest, Set, Boolean)’ was
used only once and was not adding much to
‘getPathInfoOnlyParameterMap(String, Set, Boolean)’.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863393 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mthl committed Jul 19, 2019
1 parent 1555fc8 commit d972375
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public static Map<String, Object> getParameterMap(HttpServletRequest request, Se
paramMap.put(name, value);
}

paramMap.putAll(getPathInfoOnlyParameterMap(request, nameSet, onlyIncludeOrSkip));
paramMap.putAll(getPathInfoOnlyParameterMap(request.getPathInfo(), nameSet, onlyIncludeOrSkip));

Map<String, Object> multiPartMap = new HashMap<>();
if (paramMap.size() == 0) {
Expand Down Expand Up @@ -306,10 +306,6 @@ public static Map<String, Object> getQueryStringOnlyParameterMap(String queryStr
return canonicalizeParameterMap(paramMap);
}

public static Map<String, Object> getPathInfoOnlyParameterMap(HttpServletRequest request, Set<? extends String> nameSet, Boolean onlyIncludeOrSkip) {
return getPathInfoOnlyParameterMap(request.getPathInfo(), nameSet, onlyIncludeOrSkip);
}

public static Map<String, Object> getPathInfoOnlyParameterMap(String pathInfoStr, Set<? extends String> nameSet, Boolean onlyIncludeOrSkip) {
boolean onlyIncludeOrSkipPrim = onlyIncludeOrSkip == null ? true : onlyIncludeOrSkip;
Map<String, Object> paramMap = new HashMap<>();
Expand Down

0 comments on commit d972375

Please sign in to comment.