diff options
author | Neil Fuller <nfuller@google.com> | 2016-10-12 18:08:16 +0100 |
---|---|---|
committer | Neil Fuller <nfuller@google.com> | 2016-10-13 10:51:15 +0100 |
commit | 5392e4a8da20957f5619fc296e276c37e4fbc0ec (patch) | |
tree | 169dbe1cf39d7fc56080bf2d0b149053af49a19f /annotations/generate_annotated_java_files.py | |
parent | 4193cab12a4b47920f932fc716a0c168185def76 (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