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
Loading
Please sign in to comment