You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by so...@apache.org on 2017/09/22 17:22:40 UTC

[03/50] [abbrv] wicket git commit: Fixes issue of pushing resources - review changes

Fixes issue of pushing resources - review changes

Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/ffeb024e
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/ffeb024e
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/ffeb024e

Branch: refs/heads/WICKET-6105-java.time
Commit: ffeb024eac595e19826f5d511555e98f1f823579
Parents: 50edbc4
Author: Tobias Soloschenko <ts...@sapient.com>
Authored: Thu Aug 3 12:57:59 2017 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Sun Aug 6 14:59:33 2017 +0300

----------------------------------------------------------------------
 .../apache/wicket/http2/markup/head/PushHeaderItem.java   | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/ffeb024e/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java
----------------------------------------------------------------------
diff --git a/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java b/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java
index 94d55ad..cb7aa44 100644
--- a/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java
+++ b/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java
@@ -368,21 +368,21 @@ public class PushHeaderItem extends HeaderItem
 
 				// The context path and the filter have to be applied to the URL, because otherwise
 				// the resource is not pushed correctly
-				StringBuffer partialUrl = new StringBuffer();
+				StringBuilder partialUrl = new StringBuilder();
 				String contextPath = WebApplication.get().getServletContext().getContextPath();
 				partialUrl.append(contextPath);
-				if (!contextPath.equals("/"))
+				if (!"/".equals(contextPath))
 				{
-					partialUrl.append("/");
+					partialUrl.append('/');
 				}
 				String filterPath = WebApplication.get().getWicketFilter().getFilterPath();
-				if (filterPath.equals("/"))
+				if ("/".equals(filterPath))
 				{
 					filterPath = "";
 				}
 				else if (filterPath.endsWith("/"))
 				{
-					filterPath = filterPath.replaceAll(".$", "");
+					filterPath = filterPath.substring(0, filterPath.length() - 1);
 				}
 				partialUrl.append(filterPath);
 				partialUrl.append(url.toString());