commons-lang
commons-lang copied to clipboard
StringUtils.abbreviate handles empty abbrevMarker
StringUtils.abbreviate would not abbreviate properly when an empty String was passed to abbrevMarker or abbrevMarker is null Expected behaviour: abbreviate("much too long text", "", 13).equals("much too long") Actual behaviour: abbreviate("much too long text", "", 13).equals("much too long text")
Behaves the same when abbrevMarker is null.
Added if statements to handle empty and null abbrevMarker Passed all tests