Community
Participate
Working Groups
Integration 10/21/2008. Regression introduced by fix for bug 146768 The following code should be rejected: public enum X { ; private X valueOf(String arg0) { return null; } }
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.