Community
Participate
Working Groups
Compiling the following code: public enum X { A, B; private X() throws Exception { } } It reports: ---------- 1. ERROR in C:\tests_sources\X.java (at line 1) public enum X { ^ Unhandled exception type Exception ---------- 2. ERROR in C:\tests_sources\X.java (at line 1) public enum X { ^ Unhandled exception type Exception ---------- 2 problems (2 errors) It is confusing to find out what the problem is. The error should be reported against the enum constant.
Created attachment 191229 [details] Proposed fix + regression test
Released for 3.7M7.
I think the error message could be further improved by giving the error at X rather than A and B. I have filed bug 343738 to take care of it. As the error message has improved, I am marking this as Verified. Verified for 3.7M7 using I20110421-1800