Community
Participate
Working Groups
I20050118-1015 public enum Enu { A(1, 3), B(1, 3), C(1, 3) { } ; public Enu(int i, int j) { } } According to javac and JLS3 8.8.3, enum constructors are implicitly private and cannot be declared public or protected.
Created attachment 17436 [details] Apply on HEAD Possible patch that would report: ---------- 1. ERROR in c:\tests_sources\X.java (at line 4) public X(int i, int j) { } ^^^^^^^^^^^^^^^ Illegal modifier for the enum constructor; only private is permitted. ---------- 1 problem
Patch looks good.
Fixed and released in HEAD. Regression tests added in EnumTest.test068, 069 and 070.
Verified in I20050215-2300