GitHub user rikles opened a pull request:

    https://github.com/apache/commons-lang/pull/110

    LANG-1171 Add null safe compare methods in StringUtils :

    Add null safe methods in `StringUtils` to compare 2 Strings :
    ```java
    public static int compare(final String str1, final String str2);
    public static int compare(final String str1, final String str2, final 
boolean nullIsLess);
    public static int compareIgnoreCase(final String str1, final String str2);
    public static int compareIgnoreCase(final String str1, final String str2, 
final boolean nullIsLess);
    ```
    Those methods are null safe equivalent to :
    ```java
    str1.compareTo(str2);
    str1.compareToIgnoreCase(str2);
    ```

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

    $ git pull https://github.com/rikles/commons-lang fix-LANG-1171

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

    https://github.com/apache/commons-lang/pull/110.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 #110
    
----
commit 94ec5a11122b2e60fbffcc35373c978c839bf8ae
Author: Loic Guibert <[email protected]>
Date:   2015-10-05T13:00:50Z

    LANG-1171 Add null safe compare methods in StringUtils :
      - StringUtils.compare(String str1, String str2);
      - StringUtils.compare(String str1, String str2, boolean nullIsLess);
      - StringUtils.compareIgnoreCase(String str1, String str2);
      - StringUtils.compareIgnoreCase(String str1, String str2, boolean 
nullIsLess);

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to