RFR  Mistake in documentation of ArrayList#removeRange
peter.levart at gmail.com
Fri Mar 14 10:53:25 UTC 2014
On 03/14/2014 08:05 AM, Ivan Gerasimov wrote:
> One thing I noticed is that some methods I mentioned above
> (List.subList(), Arrays.sort(), etc) throw IllegalArgumentException
> when fromIndex > toIndex, not IndexOutOfBoundException.
> Wouldn't it be more correct to adopt this into removeRange() too?
The question is, what exception should be thrown for removeRange(0, -1)
then... The order of checks matters and should be specified if two kinds
of exceptions are thrown...
More information about the core-libs-dev