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.
NPE on surrounding UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName()); with try-catch block using context menu. (Netbeans dev Build 200508181800)
Created attachment 24105 [details] log file
I'm not able to reproduce, lowering priority to standard. Please evaluate those exceptions.
I tried again and again. When I do it outside "public void run()" method all is right. But when I do it inside run(), on "new NewJFrame1().setVisible(true);" it fires NPE. I hope is ok now. This happens everytime! public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new NewJFrame1().setVisible(true); } }); }
I hope you tested on the same build
the same has happend in the latest build 200508231800.
of course that that piece of code was generated by NetBeans within a new JForm.
I got it. It's reproducible. I've put the code for setting L&F into contructor and regardless if the constructor declares throws or not trying to surround following code: new NewJFrame1().setVisible(true); with try-catch ends up with NPE.
Fixed in trunk. Checking in NewClassExpressionImpl.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ NewClassExpressionImpl.java,v <-- NewClassExpressionImpl.java new revision: 1.10; previous revision: 1.9 done
Verified in the dev build 200512262030.
Reorganization of java component