Summary: | [1.5][compiler] Should still flag Enum#valueOf override | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Philipe Mulet <philippe_mulet> | ||||||
Component: | Core | Assignee: | Kent Johnson <kent_johnson> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P3 | CC: | david_audel, frederic_fusier | ||||||
Version: | 3.5 | ||||||||
Target Milestone: | 3.5 M3 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Philipe Mulet
2008-10-21 08:05:39 EDT
Created attachment 115681 [details]
Proposed patch
The patch is not good enough. BTW, we also need to handle properly a more complex case: public enum X { ; private X valueOf(String arg0) { return null; } private X valueOf(String arg0) { return null; } private X valueOf(String arg0) { return null; } void foo() { valueOf(""); } } The generated problem type should still dump one valueOf method for consistency between batch/incremental compile. Ideally, it should keep the implicit synthetic method (considering the message indicates it taking precedence). Created attachment 115694 [details]
In progress patch
This patch still doesn't address the problem Type issue. It does ensure reporting a problem against each dup methods (including the first one), and should handle enum specials ok (nuking all user dup methods).
Code in HEAD seems to only report a problem against subsequent dup methods, and not original one any longer (where I noticed some tests expected all methods to be flagged)
Released enum test164 for 3.5M3 Was fixed by new patch for bug 146760 Verified for 3.5M3 using I20081026-2000 build. |