Make this a nested if statement.
if (result == 0 && leftLength == rightLength) we don't need to fall through to retest result < 0 and result > 0 before returning EQUALS.
If we never fall through for result == 0, we never need to test for result > 0.