Skip to content
Permalink
Browse files

Improved: Inline one ‘UtilHttp#getPathInfoOnlyParameterMap’ overload

(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 d9723759498f0e07e743160bd27d2790ecaae588
Showing with 1 addition and 5 deletions.
  1. +1 −5 framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java
@@ -158,7 +158,7 @@ private UtilHttp () {}
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) {
@@ -306,10 +306,6 @@ private UtilHttp () {}
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<>();

0 comments on commit d972375

Please sign in to comment.
You can’t perform that action at this time.