This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
commit 61ade2add5af585ec873280da8051bdb1f139c71 Author: Jacques Le Roux <[email protected]> AuthorDate: Sun Nov 10 10:43:07 2019 +0100 Improved: SeoContextFilter.java is not able to handle query strings (OFBIZ-11278) Removes a trailing blank and uses empty to check request::getParameterMap result Thanks: Mathieu to spot "empty to check request::getParameterMap result" --- .../main/java/org/apache/ofbiz/product/category/SeoContextFilter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/product/src/main/java/org/apache/ofbiz/product/category/SeoContextFilter.java b/applications/product/src/main/java/org/apache/ofbiz/product/category/SeoContextFilter.java index b7cab04..de9030f 100644 --- a/applications/product/src/main/java/org/apache/ofbiz/product/category/SeoContextFilter.java +++ b/applications/product/src/main/java/org/apache/ofbiz/product/category/SeoContextFilter.java @@ -101,7 +101,7 @@ public class SeoContextFilter implements Filter { String uri = httpRequest.getRequestURI(); Map<String, String[]> parameterMap =request.getParameterMap(); - if (parameterMap != null) { + if (!parameterMap.isEmpty()) { List<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>(); request.getParameterMap().forEach((name, values) -> { for(String value : values) { @@ -109,7 +109,7 @@ public class SeoContextFilter implements Filter { } }); String queryString = URLEncodedUtils.format(params, Charset.forName("UTF-8")); - uri = uri + "?" + queryString; + uri = uri + "?" + queryString; } boolean forwarded = forwardUri(httpResponse, uri);

