Summary: | [1.5][compiler] Enum valueOf(String) method should not be final | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Olivier Thomann <Olivier_Thomann> | ||||||||
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> | ||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||
Severity: | normal | ||||||||||
Priority: | P3 | CC: | daniel_megert, martinae | ||||||||
Version: | 3.2 | ||||||||||
Target Milestone: | 3.2 RC4 | ||||||||||
Hardware: | PC | ||||||||||
OS: | Windows XP | ||||||||||
Whiteboard: | |||||||||||
Attachments: |
|
Description
Olivier Thomann
2006-05-10 16:56:15 EDT
Created attachment 41041 [details]
Proposed fix
Ok for fixing SyntheticMethodBinding. According to JLS 8.9, both methods should be not final. Not only one, as Thread.State seems to expect. I'd be tempted to fix both cases (VALUES and VALUEOF). Not just one. Now, I don't think this is critical for RC4. javac 1.6 b82 makes #values final still... Created attachment 41049 [details]
New patch
Remove final for both values() and valueOf(String) to match the JLS3
Created attachment 41052 [details]
Updated regression tests
Re: comment 4. This got confirmed as a bug in javac: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6424358 Given this is a trivial fix, and it may impact JCL team (since modifier is made visible in generated javadoc), I am proposing to fix this for RC4. +1 for 3.2RC4 Dani/Martin: pls cast your vote Martin - pls vote Tuned EnumTest#test079,test094 to remove "final" expectations Added EnumTest#test129 Patch is OK - approving for 3.2 RC4. +1 for 3.2RC4 Fix released. Verified with I20060511-2000 for 3.2RC4 |