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/12 19:17:01 UTC

[GitHub] leventov opened a new pull request #6607: Prohibit String.replace() and String.replaceAll(), fix and prohibit some toString()-related redundancies

leventov opened a new 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
 
 
   This PR primarily prohibits methods in `String` class that compile a `Pattern`  implicitly:
    - `String.matches()`
    - `String.replace()` (It should have not in the first place; it's fixed in OpenJDK 9+)
    - `String.replaceAll()`
    - `String.replaceFirst()`
   
   I've seen 10% of allocations on a Coordinator instance to happen in `Pattern.compile()` in one of those `String.replace()` calls.
   
   Also prohibits and fixes some other String-related redundancies and inefficient patterns.

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