Skip to content

Commit

Permalink
Improved: Remove useless ‘UtilHttp#parametersToAttributes’
Browse files Browse the repository at this point in the history
(OFBIZ-11138)

This method was so trivial that it doesn't make sense to provide it.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863403 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mthl committed Jul 19, 2019
1 parent 4c72492 commit 37b6edb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ context.itemId = itemId
facility = from("Facility").where("facilityId", facilityId).queryOne()
context.facility = facility

UtilHttp.parametersToAttributes(request)
request.getParameterMap().forEach(request.&setAttribute)
if (lookup) {
reqParamMap = UtilHttp.getParameterMap(request)
paramMap = new HashMap(reqParamMap)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -669,19 +669,6 @@ public static void setInitialRequestInfo(HttpServletRequest request) {
session.setAttribute("_CLIENT_REMOTE_USER_", request.getRemoteUser());
}

/**
* Put request parameters in request object as attributes.
* @param request
*/
public static void parametersToAttributes(HttpServletRequest request) {
java.util.Enumeration<String> e = UtilGenerics.cast(request.getParameterNames());
while (e.hasMoreElements()) {
String name = e.nextElement();
request.setAttribute(name, request.getParameter(name));
}
}


private static StringBuilder prepareServerRootUrl(HttpServletRequest request) {
StringBuilder requestUrl = new StringBuilder();
requestUrl.append(request.getScheme());
Expand Down

0 comments on commit 37b6edb

Please sign in to comment.