You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by russellsanborn <gi...@git.apache.org> on 2017/11/17 16:03:14 UTC

[GitHub] groovy pull request #638: Remove deprecated StringGroovyMethods.capitalize c...

GitHub user russellsanborn opened a pull request:

    https://github.com/apache/groovy/pull/638

    Remove deprecated StringGroovyMethods.capitalize call

    I also noticed that propName was being capitalized three times in the createComparatorFor() method, so I only call it once at the beginning.
    
    I followed the same style of passing in the CharSequence like it was defined in the deprecated method:
    ```groovy
    @Deprecated
    public static String capitalize(String self) {
        return capitalize((CharSequence) self);
    }
    ````
    
    If you would rather have something like the following, or something else let me know:
    ```groovy
    CharSequence propName = property.getName();
    String capitalizedPropName = StringGroovyMethods.capitalize(propName);
    
    ```

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

    $ git pull https://github.com/russellsanborn/groovy deprecated-cleanup

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

    https://github.com/apache/groovy/pull/638.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 #638
    
----
commit bbb48937583797d2015a440d4a5b2679d5ff09db
Author: Russell Sanborn <ru...@gmail.com>
Date:   2017-11-17T16:02:19Z

    Remove deprecated StringGroovyMethods.capitalize call
    
    I also noticed that propName was being capitalized three times in the
    createComparatorFor() method, so I only call it once at the beginning.
    
    I followed the same style of passing in the CharSequence like it was
    defined in the deprecated method:
    ```groovy
    @Deprecated
    public static String capitalize(String self) {
        return capitalize((CharSequence) self);
    }
    ````
    
    If you would rather have something like the following, or something else
    let me know:
    
    ```groovy
    CharSequence propName = property.getName();
    String capitalizedPropName = StringGroovyMethods.capitalize(propName);
    
    ```

----


---

[GitHub] groovy pull request #638: Remove deprecated StringGroovyMethods.capitalize c...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/groovy/pull/638


---