summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorNeil Fuller <nfuller@google.com>2016-10-12 18:08:16 +0100
committerNeil Fuller <nfuller@google.com>2016-10-13 10:51:15 +0100
commit5392e4a8da20957f5619fc296e276c37e4fbc0ec (patch)
tree169dbe1cf39d7fc56080bf2d0b149053af49a19f /annotations/generate_annotated_java_files.py
parent4193cab12a4b47920f932fc716a0c168185def76 (diff)
Improve performance of Enum.valueOf(Class, String)
Enum.valueOf() would loop through all enum values, returning the final matching one. The common case is that there is one match: we can loop backwards and return on the first match. Bug: 32104997 Test: CtsLibcoreTestCases Change-Id: I11051d28525dd49527e056ecce7f4cdd928cf24d
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions