Closed GoogleCodeExporter closed 8 years ago
I do not understand why "null" is returned when the index is 0. Imho it should
return ann then.
Original comment by richard.eckart
on 5 Jul 2012 at 9:49
I agree.
Additionally, I think the other select*() implementations returning only one
element, throw IllegalArgumentException if no element was found or something is
wrong.
I think this should be return in the branches for index<0 and index>0 instead
of null.
Original comment by torsten....@gmail.com
on 6 Jul 2012 at 7:21
Added the selectRelative methods.
Actually, selectSingle does throw an exception. I've left the "return null" for
cases where the index is out of bounds though.
Which other methods do you refer to that should throw an exception?
selectSingle does in fact throw one.
Original comment by richard.eckart
on 15 Jul 2012 at 8:38
I meant that selectRelative() should throw an IllegalArgumentException instead
of returning null.
Original comment by torsten....@gmail.com
on 15 Jul 2012 at 9:41
I'm throwing a IndexOutOfBoundsException now. That seems more reasonable to me
than an IllegalArgumentException.
Original comment by richard.eckart
on 15 Jul 2012 at 9:54
Original issue reported on code.google.com by
torsten....@gmail.com
on 30 Apr 2012 at 12:33