RFR: 8079136: Accessing a nested sublist leads to StackOverflowError

Ivan Gerasimov ivan.gerasimov at oracle.com
Wed May 6 20:25:31 UTC 2015


And here's another update:

WEBREV: http://cr.openjdk.java.net/~igerasim/8079136/2/webrev/

> This is cleaner.
>
> For extra bonus test points you could add singleton-list, checked wrappers, and synchronized list wrappers to the test set.

Done.
I also added a simple implementation of AbstractList, just to earn a few 
more points :)

I found it much easier to create two separate constructors of SubList, 
as you Paul had suggested, then to explain how the only universal 
constructor works.
So, in this update each SubList class has a pair of constructors for 
different purposes.

Sincerely yours,
Ivan




More information about the core-libs-dev mailing list