Log in
Skip to main content
Skip to sidebar
Dashboards
Projects
Issues
Help
Jira Core help
Keyboard Shortcuts
About Jira
Jira Credits
Log In
Watched Subcomponents
JDK
JDK-4984908
Enum.valueOf(String) should used hash table instead of linear search
Log In
Resolved
Export
null
XML
Word
Printable
Details
Type:
Bug
Resolution:
Fixed
Priority:
P4
Fix Version/s:
5.0
Affects Version/s:
1.4.0
Component/s:
core-libs
Labels:
jsr201
Subcomponent:
java.lang
Resolved In Build:
b40
CPU:
generic
OS:
generic
Description
The current implementation of Enum.valueOf(String) is unnecessarily slow, and could easily be sped up from O(n) to O(k). There is a small space penalty (one little HashMap per enum type) but it's worth it.
Attachments
Activity
People
Assignee:
Josh Bloch
Reporter:
Josh Bloch
Votes:
0
Vote for this issue
Watchers:
0
Start watching this issue
Dates
Created:
2004-01-28 13:19
Updated:
2004-02-20 11:38
Resolved:
2004-02-20 11:38
Imported:
15/Sep/12 11:10 PM
Indexed:
17/Jul/12 7:33 PM