cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
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

    [ https://issues.apache.org/jira/browse/CASSANDRA-8755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15073924#comment-15073924
] 

ASF GitHub Bot commented on CASSANDRA-8755:
-------------------------------------------

GitHub user alshopov opened a pull request:

    https://github.com/apache/cassandra/pull/60

    Pull request for fixing lhf #CASSANDRA-8755

    The discussion for this patch is in JIRA:
    https://issues.apache.org/jira/browse/CASSANDRA-8755
    
    Currently pull request is for review.

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

    $ git pull https://github.com/alshopov/cassandra 8755

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

    https://github.com/apache/cassandra/pull/60.patch

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 <ash@kambanaria.org>
Date:   2015-12-28T12:38:03Z

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

commit 2685a2cdb85e9a2f6ae4303e645acafedd77c890
Author: Alexander Shopov <ash@kambanaria.org>
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 <ash@kambanaria.org>

----


> Replace trivial uses of String.replace/replaceAll/split with StringUtils methods
> --------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-8755
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8755
>             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
(v6.3.4#6332)

Mime
View raw message