diff options
| author | Tobias Thierer <tobiast@google.com> | 2017-01-10 15:54:52 +0000 |
|---|---|---|
| committer | Tobias Thierer <tobiast@google.com> | 2017-01-13 14:08:00 +0000 |
| commit | 7ae7ae73754c8b82a2e396098e35553d404c69ef (patch) | |
| tree | 6b1a3e9885f18868e40f634c695966c1855b3c5d /include/ScopedJavaUnicodeString.h | |
| parent | 0481939b641a9251b6ad3da1f3c697a277673cfc (diff) | |
Document incorrect LinkedHashMap Spliterator ordering in Android N.
Note that in Android N, the Spliterators for LinkedHashMap's
Collection Views did not report the SUBSIZED characteristic;
the Spliterators.spliterator(collection, int) call in the
suggested code snippet implicitly adds that characteristic.
This means that a Spliterator obtained via the suggested code
snippet reports not only a different order but also different
characteristics from the LinkedHashMap's native iterators.
Few applications will care about this subtle difference, and
the new behavior seems to make more sense; therefore, the
documentation does not call out this aspect.
The latest version of LinkedHashMap in AOSP (since [1])
implements its Spliterators via Spliterators.spliterator(),
which means that they do report the SUBSIZED characteristic,
just like the ones obtained via the code snippet in the
documentation added by this CL. Regression tests for the
reported characteristics of these Spliterators will be
submitted to AOSP in a separate CL.
[1] http://r.android.com/255655 (2016-08-16)
Bug: 33945212
Test: make
Test: Verified that the bug exists via guava-testlib-21.0-rc2, code
inspection and via a small new (unsubmitted) test.
Test: Verified via a small new test (unsubmitted) that the code
snippets given in the documentation produce the correct
iteration order.
Test: Verified via a small new test (unsubmitted) that LHM's
Spliterators do not report SUBSIZED before this CL, but
that the Spliterators obtained via the suggested
workaround do. Tested that the characteristics reported
by the Spliterators obtained via the workaround code
match those from LHM in the latest version of AOSP.
(cherry picked from commit 53c8c684093c1778163ed386777e802e8f5188f1)
Change-Id: I07f63a7edaf9195800a54bfb5a3a7fc880cce58a
Diffstat (limited to 'include/ScopedJavaUnicodeString.h')
0 files changed, 0 insertions, 0 deletions
