-
Bug
-
Resolution: Fixed
-
P4
-
5.0
-
b12
-
generic, x86
-
solaris_8, windows_xp
-
Verified
The compiler-generated code for the static method valueOf(String) in every enum
type scans the list of enumeration constants linearly. Correct but not very
efficient. Better would be to delegate to Enum.valueOf(Class,String), which
uses a Map maintained in the class object.
type scans the list of enumeration constants linearly. Correct but not very
efficient. Better would be to delegate to Enum.valueOf(Class,String), which
uses a Map maintained in the class object.
- duplicates
-
JDK-6352179 Modify generated valueOf method for enum (performance enhancement)
-
- Closed
-