RFR: 8079136: Accessing a nested sublist leads to StackOverflowError

Paul Sandoz paul.sandoz at oracle.com
Wed May 6 14:47:14 UTC 2015


On May 6, 2015, at 4:08 PM, Ivan Gerasimov <ivan.gerasimov at oracle.com> wrote:

> Hello everyone!
> 
> Here's the second iteration of the fix.
> 
> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8079136
> WEBREV: http://cr.openjdk.java.net/~igerasim/8079136/1/webrev/
> 

This is cleaner.

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

Paul.

> I changed all the sub-list classes to be non internal, but standalone.
> I think the logic become more obvious now.
> 
> ArrayList.SubList was renamed to ArraySubList, so it didn't conflict with SubList from AbstractList.java.
> 
> The test now uses testng.
> 
> I didn't come up with a good comment for the SubLists constructors yet.  I'll update it a bit later.
> 
> Comments, suggestions are very welcome.
> 
> Sincerely yours,
> Ivan




More information about the core-libs-dev mailing list