Author: mthl
Date: Fri Jul 19 14:32:18 2019
New Revision: 1863403
URL:
http://svn.apache.org/viewvc?rev=1863403&view=revLog:
Improved: Remove useless ‘UtilHttp#parametersToAttributes’
(OFBIZ-11138)
This method was so trivial that it doesn't make sense to provide it.
Modified:
ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/facility/FindFacilityLocation.groovy
ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java
Modified: ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/facility/FindFacilityLocation.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/facility/FindFacilityLocation.groovy?rev=1863403&r1=1863402&r2=1863403&view=diff==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/facility/FindFacilityLocation.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/facility/FindFacilityLocation.groovy Fri Jul 19 14:32:18 2019
@@ -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)
Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java?rev=1863403&r1=1863402&r2=1863403&view=diff==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java Fri Jul 19 14:32:18 2019
@@ -669,19 +669,6 @@ public final class UtilHttp {
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());