Fix various issues in CopyOnWriteArrayList discovered by Google Collections' test suite:
Fixed CopyOnWriteArrayList problems: - addAll() doesn't return true if the collection is empty - clear() fails on an empty list - containsAll() doesn't return true if the collection is empty - subList() fails on an empty range - subList() doesn't implement equals(), hashCode() or toString() Fixed CopyOnWriteArraySet problems: - addAll() adds duplicates if the added collection contains duplicates - equals() throws NullPointerException if this is empty The following issues aren't fixed: - the iterator throws UnsupportedOperationException when it should throw IllegalStateException - sublists don't reflect non-structural changes in the underlying list http://b/3270784 Change-Id: I8c174e4ceda1ff964e2ad8224fa7338dac552288
Loading
Please sign in to comment