diff options
author | Tobias Thierer <tobiast@google.com> | 2017-01-03 13:18:25 +0000 |
---|---|---|
committer | Tobias Thierer <tobiast@google.com> | 2017-01-13 11:03:50 +0000 |
commit | ffbe99d6c5f0228e25d8821e7ff84e7c54ca38a4 (patch) | |
tree | db2643a605c92e568db737390777097e554caaf5 /annotations/generate_annotated_java_files.py | |
parent | 0481939b641a9251b6ad3da1f3c697a277673cfc (diff) |
Compat behavior for Collections.sort()
AOSP libcore commit 5ae9d084f85cce06b02f7cee28db87ebe6be5056
changed Collections.sort() to call List.sort() rather than
vice versa. This causes infinite recursions in apps that call
Collections.sort() from List.sort(). (It can also lead to a
behavior difference with respect to modCount). Since popular
such apps exist, this CL guards the new behavior by a
targetSdkVersion check so that only apps targeting (and
running on) API versions > 25 observe the new behavior of
Collections.sort() calling List.sort().
The previous documentation for List.sort() was also
inappropriate since it recommended calling super.sort(),
which will only work on API level 24+ which introduced
that method.
Tests temporarily set appropriate targetSdkVersions.
Bug: 33482884
Bug: 34072201
Test: CtsLibcoreTestCases (includes CollectionsTest)
Change-Id: I57cf18895e1d03cb43ff1c8232a75744fe94b78f
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions