RFR [15] 8161558: ListIterator should not discard cause on exception

Martin Buchholz martinrb at google.com
Wed Jan 15 12:46:02 UTC 2020


Hi Kiran,

Looks good to me, but I always nitpick ...

Stray semicolon?
       var iterator = list.listIterator(list.size());; // position at end

I would have documented whitebox test assumptions: that nCopies iterators
are implemented via AbstractList, and that AbstractList's list iterator
inherits behavior from iterator.

I probably would have added a plain iterator test, and might have
refactored the code that tests the exception.


On Wed, Jan 15, 2020 at 4:07 AM Kiran Ravikumar <
kiran.sidhartha.ravikumar at oracle.com> wrote:

> Hi Guys,
>
>
> Could someone please review my fix to add missing standard constructor
> overloads to NoSuchElementException class and update the AbstractList
> class to use them.
>
>
> A CSR was filed and approved. Along with the code change a new test is
> added to verify the behavior.
>
>
> Please find the webrev at  -
>
>
> http://cr.openjdk.java.net/~kravikumar/8161558/webrev.00/
>
>
> JBS: https://bugs.openjdk.java.net/browse/JDK-8161558
>
>
> Thanks,
>
> Kiran
>
>


More information about the core-libs-dev mailing list