On Thu, May 7, 2015 at 12:23 PM, Doug Lea <[email protected]> wrote: > > It would be possible (and easy) to create a specialization for the > java.util.Arrays.ArrayList class (i.e., the kind returned by > Arrays.asList(a).subList), which would also fix the SOE problem > in this particular case.
It seems it would be a fairly clean win to no longer have Arrays.ArrayList subclass AbstractList, getting rid of modCount (no structural modifications are possible!), at the cost of more copying. Maybe it could subclass AbstractCollection instead?
