You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by el...@apache.org on 2017/04/25 17:46:30 UTC
calcite-avatica git commit: [CALCITE-1752] Use URLDecoder instead of
manually replacing %20
Repository: calcite-avatica
Updated Branches:
refs/heads/master 557f15cc7 -> d9809ceef
[CALCITE-1752] Use URLDecoder instead of manually replacing %20
Closes #7
Project: http://git-wip-us.apache.org/repos/asf/calcite-avatica/repo
Commit: http://git-wip-us.apache.org/repos/asf/calcite-avatica/commit/d9809cee
Tree: http://git-wip-us.apache.org/repos/asf/calcite-avatica/tree/d9809cee
Diff: http://git-wip-us.apache.org/repos/asf/calcite-avatica/diff/d9809cee
Branch: refs/heads/master
Commit: d9809ceef73b42f6662e2a195f7f8e7644058cab
Parents: 557f15c
Author: Josh Elser <el...@apache.org>
Authored: Tue Apr 25 12:24:57 2017 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Tue Apr 25 12:27:41 2017 -0400
----------------------------------------------------------------------
.../apache/calcite/avatica/server/BasicAuthHttpServerTest.java | 5 +++--
.../apache/calcite/avatica/server/DigestAuthHttpServerTest.java | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/calcite-avatica/blob/d9809cee/server/src/test/java/org/apache/calcite/avatica/server/BasicAuthHttpServerTest.java
----------------------------------------------------------------------
diff --git a/server/src/test/java/org/apache/calcite/avatica/server/BasicAuthHttpServerTest.java b/server/src/test/java/org/apache/calcite/avatica/server/BasicAuthHttpServerTest.java
index dd71aae..9f9914a 100644
--- a/server/src/test/java/org/apache/calcite/avatica/server/BasicAuthHttpServerTest.java
+++ b/server/src/test/java/org/apache/calcite/avatica/server/BasicAuthHttpServerTest.java
@@ -25,6 +25,7 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
+import java.net.URLDecoder;
import java.util.Properties;
import static org.hamcrest.core.StringContains.containsString;
@@ -43,8 +44,8 @@ public class BasicAuthHttpServerTest extends HttpAuthBase {
private static String url;
@BeforeClass public static void startServer() throws Exception {
- final String userPropertiesFile = BasicAuthHttpServerTest.class
- .getResource("/auth-users.properties").getFile().replace("%20", " ");
+ final String userPropertiesFile = URLDecoder.decode(BasicAuthHttpServerTest.class
+ .getResource("/auth-users.properties").getFile(), "UTF-8");
assertNotNull("Could not find properties file for basic auth users", userPropertiesFile);
// Create a LocalService around HSQLDB
http://git-wip-us.apache.org/repos/asf/calcite-avatica/blob/d9809cee/server/src/test/java/org/apache/calcite/avatica/server/DigestAuthHttpServerTest.java
----------------------------------------------------------------------
diff --git a/server/src/test/java/org/apache/calcite/avatica/server/DigestAuthHttpServerTest.java b/server/src/test/java/org/apache/calcite/avatica/server/DigestAuthHttpServerTest.java
index 6db9993..a5d8e86 100644
--- a/server/src/test/java/org/apache/calcite/avatica/server/DigestAuthHttpServerTest.java
+++ b/server/src/test/java/org/apache/calcite/avatica/server/DigestAuthHttpServerTest.java
@@ -25,6 +25,7 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
+import java.net.URLDecoder;
import java.util.Properties;
import static org.hamcrest.core.StringContains.containsString;
@@ -43,8 +44,8 @@ public class DigestAuthHttpServerTest extends HttpAuthBase {
private static String url;
@BeforeClass public static void startServer() throws Exception {
- final String userPropertiesFile = BasicAuthHttpServerTest.class
- .getResource("/auth-users.properties").getFile().replace("%20", " ");
+ final String userPropertiesFile = URLDecoder.decode(BasicAuthHttpServerTest.class
+ .getResource("/auth-users.properties").getFile(), "UTF-8");
assertNotNull("Could not find properties file for digest auth users", userPropertiesFile);
// Create a LocalService around HSQLDB