You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2014/03/15 23:15:23 UTC
svn commit: r1577941 - in
/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category:
SeoContentUrlFilter.java SeoContextFilter.java UrlRegexpContextFilter.java
Author: jleroux
Date: Sat Mar 15 22:15:23 2014
New Revision: 1577941
URL: http://svn.apache.org/r1577941
Log:
Adapts to r1570810 <<Performance optimization for UtilHttp.getFullRequestUrl method: instead of returning a StringBuffer object (synchronized) it now returns a String (immutable); internally it uses a StringBuilder (lighter because not synchronized) within a private context.>>
Modified:
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoContentUrlFilter.java
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoContextFilter.java
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/UrlRegexpContextFilter.java
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoContentUrlFilter.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoContentUrlFilter.java?rev=1577941&r1=1577940&r2=1577941&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoContentUrlFilter.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoContentUrlFilter.java Sat Mar 15 22:15:23 2014
@@ -65,8 +65,7 @@ public class SeoContentUrlFilter extends
// Set request attribute and session
UrlServletHelper.setRequestAttributes(request, delegator, servletContext);
String urlContentId = null;
- StringBuffer pathInfoBuffer = UtilHttp.getFullRequestUrl(httpRequest);
- String pathInfo = pathInfoBuffer.toString();
+ String pathInfo = UtilHttp.getFullRequestUrl(httpRequest);
if (UtilValidate.isNotEmpty(pathInfo)) {
String alternativeUrl = pathInfo.substring(pathInfo.lastIndexOf("/"));
if (alternativeUrl.endsWith("-content")) {
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoContextFilter.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoContextFilter.java?rev=1577941&r1=1577940&r2=1577941&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoContextFilter.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoContextFilter.java Sat Mar 15 22:15:23 2014
@@ -112,8 +112,8 @@ public class SeoContextFilter extends Co
httpRequest.setAttribute("_CONTEXT_ROOT_", config.getServletContext().getRealPath("/"));
// set the server root url
- StringBuffer serverRootUrl = UtilHttp.getServerRootUrl(httpRequest);
- httpRequest.setAttribute("_SERVER_ROOT_URL_", serverRootUrl.toString());
+ String serverRootUrl = UtilHttp.getServerRootUrl(httpRequest);
+ httpRequest.setAttribute("_SERVER_ROOT_URL_", serverRootUrl);
// request attributes from redirect call
String reqAttrMapHex = (String) httpRequest.getSession().getAttribute("_REQ_ATTR_MAP_");
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/UrlRegexpContextFilter.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/UrlRegexpContextFilter.java?rev=1577941&r1=1577940&r2=1577941&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/UrlRegexpContextFilter.java (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/UrlRegexpContextFilter.java Sat Mar 15 22:15:23 2014
@@ -111,8 +111,8 @@ public class UrlRegexpContextFilter exte
httpRequest.setAttribute("_CONTEXT_ROOT_", config.getServletContext().getRealPath("/"));
// set the server root url
- StringBuffer serverRootUrl = UtilHttp.getServerRootUrl(httpRequest);
- httpRequest.setAttribute("_SERVER_ROOT_URL_", serverRootUrl.toString());
+ String serverRootUrl = UtilHttp.getServerRootUrl(httpRequest);
+ httpRequest.setAttribute("_SERVER_ROOT_URL_", serverRootUrl);
// request attributes from redirect call
String reqAttrMapHex = (String) httpRequest.getSession().getAttribute("_REQ_ATTR_MAP_");