Details
Description
An ArrayIndexOutofBoundsException is thrown when the toArray(T[]) method is invoked, under load test with multiple threads. Concurrent updates to the collection results in changing Iterator sizes. As per the Javadocs, the result of the toArray(T[]) should return as much elements possible from the Collection.
A toArray(T[]) method override has been implemented in ConcurrentSkipListSet and the bounds check has been included in the base class AbstractCollection to prevent this exception.
Attachments
Attachments
Issue Links
- relates to
-
HARMONY-6681 AbstractCollection.toArray() and AbstractCollection.toArray(T[]) are broken for concurrently modified collections like ConcurrentHashMap.keySet()
-
- Open
-