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.
I noticed this because I've a class that opens a frame in the static initializer. This is annoying and even dangerous I think. This is NB 3.2 build 8. Here's an example: ----%<----%<----%<---- import javax.swing.*; public class StaticInit { static { JFrame frame = new JFrame (); frame.setSize (200, 200); frame.show (); System.err.println ("test"); } }
This is probably a thing we have to work with. I will discuss it on Monday with core developers, because changing the code not to initialize and LINK classes could cause strange errors later. If the class is linked/initialized immediately, such errors are caught by code that anticipates some Errors/Exceptions.
I can probably do nothing about it right now, LinkErrors and other stuff are now trapped inside the code that asks for a java.lang.Class (basically the code that enables/disables Customize Bean action). If I postpone linking / initialization of the class, the IDE may issue random error messages at later point :-(
Resolved for 3.3.x or earlier, no new info since then -> closing.
Resolved for 3.4.x or earlier, no new info since then -> closing.