Re: [lang] StringUtils.equals bug on non-Strings with identical leading prefix

2015-08-10 Thread sebb
On 10 August 2015 at 19:14, Aman Agarwal aman.agar...@twosigma.com wrote: StringUtils.equals(cs1,cs2) delegates to CharSequence.regionMatches(...) in a way that causes IndexOutOfBounds when either of cs1/cs2 isn't a String. Specifically, comparing foo and foobar for non-String CharSequences

[lang] StringUtils.equals bug on non-Strings with identical leading prefix

2015-08-10 Thread Aman Agarwal
StringUtils.equals(cs1,cs2) delegates to CharSequence.regionMatches(...) in a way that causes IndexOutOfBounds when either of cs1/cs2 isn't a String. Specifically, comparing foo and foobar for non-String CharSequences bombs due to CharSequenceUtils.regionMatches(cs1, false, 0, cs2, 0,