summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorNeil Fuller <nfuller@google.com>2018-05-23 11:19:46 +0100
committerNeil Fuller <nfuller@google.com>2018-05-31 09:58:53 +0100
commit0e8b937ded4de39f1d1cea5f04800d67dd2ec570 (patch)
treea0fb3ec35bead453b24c3ec1e2f41c094fc34726 /annotations/generate_annotated_java_files.py
parentf9782031c996da34a678de2c7ae083e315242df7 (diff)
Introduce the CovariantReturnType annotation
This commit introduces the CovariantReturnType annotation that can be used to prepare the Android platform for future API changes associated with more specific return types on subclass methods. The annotation introduces platform bytecode for the new form of the method as a synthetic overload of the original, public version. This commit contains a first example: A change to ConcurrentHashMap made in OpenJDK 8. Android cannot make this change without breaking apps that compile against latest stubs but have to run on older releases. The API change can only be made once apps will no longer be run on devices without the synthetic version (without app tooling changes to accelerate the switch). This commit also introduces a test to confirm that the platform bytecode is present in the old and new forms. There are platform tooling changes associated with this commit. Bug: 70661641 Test: CTS: run cts -m CtsLibcoreTestCases Change-Id: I39c4152223aed34642169689cba39de313358655
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions