RFR  8011645: CopyOnWriteArrayList.COWSubList.subList does not validate range properly
jason_mehrens at hotmail.com
Fri Jan 31 23:09:46 UTC 2014
Totally agree with everything that has been said on this. Leaving it 'unresolved' or 'closed as will not fix' won't bother me.
Mike has it listed as a 'doc clarification only' so my suggestion toward a resolution would be to modify AbstractList.subList documentation with a spec implementation note.
Might be worth adding to the bug report that AbstractList.removeRange doesn't detect or specify that exceptions are thrown when 'to' is less than 'from' but, ArrayList.removeRange overrides AbstactList.removeRange with an implementation that detects and throws IOOBE. Might want to add an optional IOOBE exception to AbstractList.removeRange documentation when this patch is attempted.
> Subject: Re: RFR  8011645: CopyOnWriteArrayList.COWSubList.subList does not validate range properly
> From: mike.duigou at oracle.com
> Date: Fri, 31 Jan 2014 12:06:16 -0800
> CC: jason_mehrens at hotmail.com; core-libs-dev at openjdk.java.net
> To: martinrb at google.com
> On Jan 31 2014, at 11:50 , Martin Buchholz <martinrb at google.com> wrote:
>> Thanks for pointing that out. I'm sure I have seen those bugs before (when
>> I owned them!) but had suppressed the memory.
> I'm currently the assignee for this bug.
>> I probably didn't try fixing them because there is no clean way out, and I
>> was afraid of getting bogged down in compatibility hell for what is a
>> non-issue for real-world users.
> Indeed. That's exactly why they still haven't been addressed. Suggestions are, of course, always welcome.
More information about the core-libs-dev