This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Compiling this source code within FFJ gives "constant expression required". It compiles fine from commandline. /* * Class.java * * Created on 29 January 2002, 16:13 * * @author pp124457 * @version **/ public class Test { public static final int A = 1; public static final int B = 2; /** Creates new Test */ public Test() { } public static void main(String[] args) { Test t = new Test(); int param = 1; switch (param) { case t.A: System.out.println("It is : " + param); break; case t.B: System.out.println("It is: " + param); break; } } } [FFJ CUSTBUG] *** bug reported by FFJ customer ***
Tested on jdk1.4.0-b92 (fcs) and jsk1.3.1_02 - javac, fastjavac - from ide and from commandline. Code wasn't compiled in any case. So closing this as invalid - error isn't in NB. t.A is constant but none from tested compilers handle it so, whereas Test.A is ok.
Resolved for 3.4.x or earlier, no new info since then -> verified.
Resolved for 3.4.x or earlier, no new info since then -> closing.