/** * Compares the two given strings for order, handling null as necessary. * * @return a negative integer, zero, or a positive integer as the first * object is less than, equal to, or greater than the second object. */ private int nullSafeCompare(String first, String second) { int result = nullCompare(first, second); return result == NON_NULLS ? StringUtils.compare(first, second) : result; }
/** * Compares the two given strings for order, handling null as necessary. * * @return a negative integer, zero, or a positive integer as the first * object is less than, equal to, or greater than the second object. */ private int nullSafeCompare(String first, String second) { int result = nullCompare(first, second); return result == NON_NULLS ? StringUtils.compare(first, second) : result; }