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.
When having the following code: public class Bug1 { private final static Object OBJECT = new Object() {{ System.out.println("OBJECT.toString() = " + OBJECT.toString()); }}; public static void main(String[] args) { } } It will always generate a NPE, because I am referencing OBJECT before it is created. Yet the IDE does not show a warning (or even error) that I am dereferencing a null-pointer. I think this is a bug, because I think it will always give a NPE.