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.
Product Version = NetBeans IDE 7.4 Beta (Build 201307092200) Operating System = Linux version 3.8.0-26-generic running on amd64 Java; VM; Vendor = 1.7.0_25 Runtime = Java HotSpot(TM) 64-Bit Server VM 23.25-b01 I compiled a project with Netbeans 4 beta and shows that some files have errors. The same project opened with Netbeans 3.7.1 does not show them. See attached picture for details.
Created attachment 138134 [details] IDE log
Created attachment 138136 [details] Picture showing the errors in NB4 compared to NB3.7.1
Invalid. The JDK used on command line (JDK 7 according to synopses) has a bug in finding search scope, NetBeans is correct. The code will not compile neither on JDK 6 nor on JDK 8 where the bug in compiler was fixed. The source code on screenshot is incorrect according to JLS. The compiler HAS NOT to find the static imported valueOf it HAS TO stop scope search in Enum and find only the <T extends Enum<T>> T Enum.valueOf(Class<T> enumType,String name) which is apparently not applicable, so the attribution has to emit the error. For details see JLS 15.12.1 http://docs.oracle.com/javase/specs/jls/se5.0/html/expressions.html#15.12.1
@Tomas Thanks for the clarification. Indeed, if I rename the method the static import works fine. I changed to JDK8-preview and the code does not compile as you said.