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.
[junit] Testcase: testCreateAndWait(org.openide.awt.MenuBarNotInAWTTest): FAILED [junit] (MenuBarNotInAWTTest.testCreateAndWait marked @RandomlyFails so try just running test again) Created only in AWT [junit] junit.framework.AssertionFailedError: (MenuBarNotInAWTTest.testCreateAndWait marked @RandomlyFails so try just running test again) Created only in AWT [junit] at org.openide.awt.MenuBarNotInAWTTest$MyLaF.<init>(MenuBarNotInAWTTest.java:96) [junit] at java.lang.reflect.Constructor.newInstance(Constructor.java:526) [junit] at java.lang.Class.newInstance(Class.java:374) [junit] at javax.swing.UIManager.setLookAndFeel(UIManager.java:580) [junit] at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1345) [junit] at javax.swing.UIManager.initialize(UIManager.java:1455) [junit] at javax.swing.UIManager.maybeInitialize(UIManager.java:1422) [junit] at javax.swing.UIManager.getDefaults(UIManager.java:656) [junit] at javax.swing.UIManager.get(UIManager.java:952) [junit] at org.openide.util.ImageUtilities.getImageIconFilter(ImageUtilities.java:181) [junit] at org.openide.util.ImageUtilities.loadImageIcon(ImageUtilities.java:172) [junit] at org.openide.awt.DynaMenuModel.<clinit>(DynaMenuModel.java:73) [junit] at org.openide.awt.MenuBar$MenuBarFolder.<init>(MenuBar.java:358) [junit] at org.openide.awt.MenuBar.startLoading(MenuBar.java:294) [junit] at org.openide.awt.MenuBar.<init>(MenuBar.java:162) [junit] at org.openide.awt.MenuBarNotInAWTTest.testCreateAndWait(MenuBarNotInAWTTest.java:84) [junit] at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:97) [junit] at org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:431) [junit] at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:357) [junit] at java.lang.Thread.run(Thread.java:724) [junit] [junit] [junit] Test org.openide.awt.MenuBarNotInAWTTest FAILED
The test probably fails since commit #1df8daf75020. Constructor of MenuBar$MenuBarFolder creates a new instance of DynaMenuModel, which initializes its static constant BLANK_ICON. ImageUtilities.loadImageIcon calls method getImageIconFilter, which calls UIManager.get("nb.imageicon.filter"). So LookAndFeel is initialized outside of the EDT. (It could be a problem, see bug 172277.) I'm not sure whether the test, ImageUtilities or DynaMenuModel should be fixed. Please, do you any suggestions?
core-main 899f611ff0c8
Integrated into 'main-silver', will be available in build *201307302300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/899f611ff0c8 User: S. Aubrecht <saubrecht@netbeans.org> Log: #232918 - failing test