diff options
author | Markus Koivisto <markus@vaadin.com> | 2016-05-10 10:42:54 +0300 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2016-05-11 11:04:16 +0000 |
commit | bfec8f89074be865b2bc9fc74ee895efc6f66ad4 (patch) | |
tree | 494f662a478247f3499b42c115d70d198fbd105b /server | |
parent | 091b46e706b091b7da1ddb19753c9cdf61b5cb46 (diff) | |
download | vaadin-framework-bfec8f89074be865b2bc9fc74ee895efc6f66ad4.tar.gz vaadin-framework-bfec8f89074be865b2bc9fc74ee895efc6f66ad4.zip |
Remove guava URL encode dependency
Change-Id: I7b76c7736f470dd5016370b61d3872300c3331a9
Diffstat (limited to 'server')
-rw-r--r-- | server/pom.xml | 2 | ||||
-rw-r--r-- | server/src/main/java/com/vaadin/server/BootstrapHandler.java | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/server/pom.xml b/server/pom.xml index 92ed9c2713..6ea5ab87fc 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -273,7 +273,7 @@ javax.portlet;version="[${javax.portlet.version},3)";resolution:=optional, javax.portlet.filter;version="[${javax.portlet.version},3)";resolution:=optional, com.liferay.portal.kernel.util;resolution:=optional</Import-Package> - <Require-Bundle>com.google.gwt.thirdparty.guava;bundle-version="${guava.version}", + <Require-Bundle> com.vaadin.shared;bundle-version="${project.version}", com.vaadin.push;bundle-version="${project.version}";resolution:=optional, com.vaadin.sass-compiler;bundle-version="${vaadin.sass.version}";resolution:=optional"</Require-Bundle> diff --git a/server/src/main/java/com/vaadin/server/BootstrapHandler.java b/server/src/main/java/com/vaadin/server/BootstrapHandler.java index d3a988bea3..c139d5443c 100644 --- a/server/src/main/java/com/vaadin/server/BootstrapHandler.java +++ b/server/src/main/java/com/vaadin/server/BootstrapHandler.java @@ -20,6 +20,8 @@ import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; @@ -37,7 +39,6 @@ import org.jsoup.nodes.Element; import org.jsoup.nodes.Node; import org.jsoup.parser.Tag; -import com.google.gwt.thirdparty.guava.common.net.UrlEscapers; import com.vaadin.annotations.JavaScript; import com.vaadin.annotations.StyleSheet; import com.vaadin.annotations.Viewport; @@ -227,7 +228,14 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler { @Override protected String encodeQueryStringParameterValue(String queryString) { - return UrlEscapers.urlFormParameterEscaper().escape(queryString); + String encodedString = null; + try { + encodedString = URLEncoder.encode(queryString, "UTF-8"); + } catch (UnsupportedEncodingException e) { + // should never happen + throw new RuntimeException("Could not find UTF-8", e); + } + return encodedString; } } |