RFR  8011645: CopyOnWriteArrayList.COWSubList.subList does not validate range properly
mike.duigou at oracle.com
Fri Jan 31 20:06:16 UTC 2014
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.
> On Fri, Jan 31, 2014 at 11:43 AM, Jason Mehrens
> <jason_mehrens at hotmail.com>wrote:
>> Unifying the List testing code might be kind of tricky with
>> https://bugs.openjdk.java.net/browse/JDK-4506427 as unresolved.
>> The patch looks good though.
>>> Date: Fri, 31 Jan 2014 10:07:31 -0800
>>> Subject: Re: RFR  8011645: CopyOnWriteArrayList.COWSubList.subList
>> does not validate range properly
>>> From: martinrb at google.com
>>> To: chris.hegarty at oracle.com
>>> CC: core-libs-dev at openjdk.java.net
>>> The jtreg test is fine, but:
>>> When I created MOAT.java many years ago, I intended tests such as this to
>>> get added to that, so that all of the List implementations could share
>>> same test code. jsr166 does not have the same concern, since it only has
>>> one List implementation at the moment. Today, there are other choices,
>>> like sharing test infrastructure with Guava e.g. ListTestSuiteBuilder.
>>> More generally, openjdk core libraries can benefit from all the great
>>> testing work that guava folk have done.
>>> On Fri, Jan 31, 2014 at 8:23 AM, Chris Hegarty <chris.hegarty at oracle.com
>>>> Trivial change to CopyOnWriteArrayList.COWSubList.subList to catch the
>>>> case where the fromIndex is greater that the toIndex.
More information about the core-libs-dev