You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2018/11/15 18:21:43 UTC

[GitHub] b-slim commented on a change in pull request #6607: Prohibit String.replace() and String.replaceAll(), fix and prohibit some toString()-related redundancies

b-slim commented on a change in pull request #6607: Prohibit String.replace() and String.replaceAll(), fix and prohibit some toString()-related redundancies
URL: https://github.com/apache/incubator-druid/pull/6607#discussion_r233956126
 
 

 ##########
 File path: core/src/main/java/org/apache/druid/java/util/common/StringUtils.java
 ##########
 @@ -173,16 +163,81 @@ public static String urlEncode(String s)
     }
   }
 
-  private static String removeChar(String s, char c, int firstOccurranceIndex)
+  /**
+   * Removes all occurrences of the given char from the given string. This method is an optimal version of
+   * {@link String#replace(CharSequence, CharSequence) s.replace("c", "")}.
 
 Review comment:
   i think the description is not accurate, what is `""` in terms of char ? 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org