summaryrefslogtreecommitdiff
path: root/docs/html/sdk/api_diff/23/changes
diff options
context:
space:
mode:
authorTobias Thierer <tobiast@google.com>2017-02-07 23:58:17 +0000
committerTobias Thierer <tobiast@google.com>2017-03-07 16:38:43 +0000
commit093572cd1b482a242c8996d2d2bccdf75bd33254 (patch)
tree93117fd02d44d261bac90d1d28c048e800c4e442 /docs/html/sdk/api_diff/23/changes
parentc7eefdbda7864c71f2bc1845e83d9a21aa10c338 (diff)
Don't allow MapCollections to iterate past the end.
Prior to this CL, MapCollections such as ArrayMap's entrySet, keySet and values, exhibited unusual Iterator behavior: - instead of throwing NoSuchElementException once the end of the Collection was reached, Iterator.next() instead returned a null key / a null value / an entry with a null key and value. - however, remove() removed the last actual element of the Collection; successive calls of next(), remove() would result in successive elements being removed, in reverse iteration order. - Once the Collection had been cleared through calls to remove(), ArrayIndexOutOfBoundsException was thrown from iterator.next() (for keySet and values) or from iterator.remove (for entrySet). This CL fixes those Collections' Iterators to let next() throw NoSuchElementException when hasNext() would have returned false. Since the new behavior was already guaranteed by the Iterator documentation, any app compatibility effect from this CL is both unlikely, and unlikely to be negative. Bug: 19853326 Test: make cts && cts-tradefed run cts -m CtsUtilTestCases Change-Id: Ie3f0594f434dd5625799791829bd94fbaef94906
Diffstat (limited to 'docs/html/sdk/api_diff/23/changes')
0 files changed, 0 insertions, 0 deletions