cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-8755) Replace trivial uses of String.replace/replaceAll/split with StringUtils methods
Date Tue, 29 Dec 2015 13:56:49 GMT


ASF GitHub Bot commented on CASSANDRA-8755:

GitHub user alshopov opened a pull request:

    Pull request for fixing lhf #CASSANDRA-8755

    The discussion for this patch is in JIRA:
    Currently pull request is for review.

You can merge this pull request into a Git repository by running:

    $ git pull 8755

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #60
commit 0d929cbc552a9f76fb34e5976d6094ea18093a83
Author: Alexander Shopov <>
Date:   2015-12-28T12:38:03Z

    Add unit tests that verify current behavior in order to check changes
    Signed-off-by: Alexander Shopov <>

commit 2685a2cdb85e9a2f6ae4303e645acafedd77c890
Author: Alexander Shopov <>
Date:   2015-12-29T12:14:50Z

    Trivial speedups of string operations
    String.split has fast path for some single char and two char combinations.
    They fail in cases when the char is regex meta (mainly the '.' character).
    Use StringUtils.split then.
    Convert String.replaceAll to static final Pattern-s usage.
    Less throwaway j.u.r.Patterns by using precompiled versions
    Replace front and back whitespace removal with trim
    Remove unused imports from changed files.
    Signed-off-by: Alexander Shopov <>


> Replace trivial uses of String.replace/replaceAll/split with StringUtils methods
> --------------------------------------------------------------------------------
>                 Key: CASSANDRA-8755
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jaroslav Kamenik
>            Priority: Trivial
>              Labels: lhf
>         Attachments: 8755.tar.gz, trunk-8755.patch, trunk-8755.txt
> There are places in the code where those regex based methods are  used with plain, not
regexp, strings, so StringUtils alternatives should be faster.

This message was sent by Atlassian JIRA

View raw message