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_r244906784
 
 

 ##########
 File path: 
core/src/main/java/org/apache/druid/java/util/common/StringUtils.java
 ##########
 @@ -153,10 +154,32 @@ public static String toUpperCase(String s)
     return s.toUpperCase(Locale.ENGLISH);
   }
 
+  @Nullable
   public static String urlEncode(String s)
   {
+    if (s == null) {
+      return null;
+    }
+
+    try {
+      // application/x-www-form-urlencoded encodes spaces as "+", but we use 
this to encode non-form
+      // data as well, so replace "+" with "%20".
 
 Review comment:
   Added this to method javadoc

----------------------------------------------------------------
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]

Reply via email to