Age | Commit message (Collapse) | Author |
|
This covers
- integration of all changes from OpenJDK 9+181 into
java.util.{AbstractList,List,Map,Objects,Set}.
- Map, List, Set gain static of() / ofEntries() factory methods.
- Objects gains misc static checker methods.
- When implementing RandomAccess, AbstractList.spliterator() as
well as subList.spliterator() is now built on top of random-access
List.get(int) rather than List.iterator().
- addition of various new files that are needed by those.
- addition of Nullablity annotations for the new APIs.
Changes to reference upstream versions
--------------------------------------
While the other files were previously derived from OpenJDK 8u121-b13,
Map.java was previously derived from OpenJDK 9b113+. After this CL,
all of the touched files derive from OpenJDK 9+181 with no further
changes waiting to be integrated; Android-changed and similar markers
note where Android carries local patches.
Notes on test coverage
----------------------
This CL adds test coverage for the new APIs/behavior.
The test coverage for Set.of() duplicates a bunch of logic from
the List.of() coverage. I experimented with ways to reuse code
but that reduced clarity and I didn't want to spend a lot of effort
on a major rearchitecture of the tests.
AbstractListTest asserts that iterator() is not called
while exercising basic existing Android spliterator, and checks
the fail-fast behavior guaranteed by the documentation.
Bug: 147483640
Test: atest CtsLibcoreTestCases:libcore.java.util.{Map,List,Set}OfTest
Test: atest CtsLibcoreTestCases:libcore.java.util.{AbstractList,Objects}Test
Test: atest CtsLibcoreTestCases
Test: Checked how the added @implSpec appear in generated docs: they
appear under headings "Implementation Requirements:".
Change-Id: I362ec405b270ba00fe3176dc19f08943b7d350d5
|
|
Introduce the TzDataSetVersion class to handle time
zone data and format versioning. It is a near-exact
copy of com.android.timezone.distro.DistroVersion
except that constants have been exposed as methods
to avoid inlining (important since the code using
this new class will not be updated when libcore code
is updated with new version requirements in future
versions of Android).
libcore.util is becoming increasingly filled with
time zone related classes so the new class is being
added in libcore.timezone.
Another easy-to-move class, TimeZoneDataFiles is being
moved there. Other time zone data-related classes
will be moved in follow-up changes.
Bug: 119026403
Test: CTS: run cts-dev -m CtsLibcoreTestCases
Change-Id: I57feae567e28950588062e5c67a954ed4f02462e
|
|
This is another package that was forgotten from
module-info.java, on top of the ones addressed in
http://r.android.com/523335
This CL adds it.
No effort was made to confirm whether any additional
packages were forgotten; I'm adding them as they show
up as compile-time problems. In the long run, this
file should be generated at compile time.
Test: Treehugger
Bug: 38177569
Change-Id: Ifa642478e89621d7ae83f8bf96f044940a0f9ad7
|
|
module-info.java is only used when building with OpenJDK 9
and targeting 1.9 (which currently doesn't work yet do to
unsolved problems). It is currently maintained by hand, and
these packages were missing. A future CL might change this
file to be generated automatically so that no packages are
missed.
Bug: 63986449
Test: Treehugger
Change-Id: Id0d58ce562311e26960c0493d5067bda7fd4f5f9
|
|
This is the first step towards compiling with
EXPERIMENTAL_USE_OPENJDK9=true.
Bug: 63986449
Test: m EXPERIMENTAL_USE_OPENJDK9=true
Change-Id: I8ece7f6d27c2292f42bd18a0106b2bae2e7bed73
|