jon-wei commented on a change in pull request #6761: Some fixes and tests for
spaces/non-ASCII chars in datasource names
URL: https://github.com/apache/incubator-druid/pull/6761#discussion_r244906795
##########
File path:
core/src/test/java/org/apache/druid/java/util/common/StringUtilsTest.java
##########
@@ -148,4 +148,14 @@ public void testReplace()
Assert.assertEquals("bb", StringUtils.replace("aaaa", "aa", "b"));
Assert.assertEquals("", StringUtils.replace("aaaa", "aa", ""));
}
+
+ @Test
+ public void testURLEncodeSpace()
+ {
+ String s1 = StringUtils.urlEncode("aaa bbb");
+ Assert.assertEquals(s1, "aaa%20bbb");
+
+ String s2 = StringUtils.urlEncode("fff+ggg");
+ Assert.assertEquals(s2, "fff%2Bggg");
Review comment:
Added decode checks
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]