Update Collections to OpenJDK8u60 (part 1)
Documented why updating Collections.sort() would carry app
compat risk. We may still decide to update that method to
OpenJDK8u60 but if so then it should be done in a separate,
targeted CL that can be separately reverted (if necessary).
The Android-changed section in CheckedList.replaceAll()
was dropped.
The following new static factory methods were added to
Collections.java but were marked @hide because they do
not yet have tests:
unmodifiableNavigableSet()
unmodifiableNavigableMap()
synchronizedNavigableSet()
synchronizedNavigableMap()
checkedQueue()
checkedNavigableSet()
checkedNavigableMap()
emptySortedSet()
emptyNavigableSet()
emptySortedMap()
emptyNavigableMap()
Remaining work for future CLs:
- decide whether to update Collections.sort() to
OpenJDK8u60 (implement Collections.sort() on top of
List.sort() rather than the other way round).
- Add test coverage for the new static factory methods
mentioned above, and un-@hide them.
- rename the Collections.singleton{,List}() type
parameter from <E> to <T>.
Bug: 29935305
Test: cts-tradefed run cts -m CtsLibcoreTestCases -a arm64-v8a
Change-Id: I28fda8b23261a225291d3ae5b9b0170a55cc64d4
1 file changed