-
Bug
-
Resolution: Fixed
-
P2
-
5.0
-
tiger
-
generic, x86, sparc
-
generic, solaris_2.6, windows_2000
-
Verified
Name: apR10229 Date: 05/27/2003
Filed By : SPB JCK team (###@###.###)
JDK : java full version "1.5.0-beta-b06"
JCK : 1.5
Platform[s] : Solaris
switch/Mode :
JCK test owner : http://javaweb.eng/jct/sqe/JCK-tck/usr/owners.jto
Failing Test [s] : N/A
Problem description
===================
There is an unexpected interdependency between
javax.swing.JComboBox and javax.swing.MenuSelectionManager.
About 120 jck tests, executed in the single JVM fail due to NPE,
thrown by the method javax.swing.plaf.basic.BasicPopupMenuUI$MouseGrabber.grabWindow().
Minimized test:
===============
------- Test.java -------
import javax.swing.*;
class Test {
public static void main(String[] args) {
JComboBox comboBox = new JComboBox();
JMenuBar menuBar = new JMenuBar();
JMenu menu = new JMenu("Menu");
menuBar.add(menu);
JMenuItem menuItem = new JMenuItem("Item");
menu.add(menuItem);
MenuElement menuPath[] = {menuBar, menu, menuItem };
MenuSelectionManager.defaultManager().setSelectedPath(menuPath);
}
}
------- end-of-Test.java -------
Minimized test output:
======================
<pav@libra(pts/8).291> javac -d . Test.java && java -cp . Test
Exception in thread "main" java.lang.NullPointerException
at javax.swing.plaf.basic.BasicPopupMenuUI$MouseGrabber.grabWindow(BasicPopupMenuUI.java:686)
at javax.swing.plaf.basic.BasicPopupMenuUI$MouseGrabber.stateChanged(BasicPopupMenuUI.java:705)
at javax.swing.MenuSelectionManager.fireStateChanged(MenuSelectionManager.java:161)
at javax.swing.MenuSelectionManager.setSelectedPath(MenuSelectionManager.java:87)
at Test.main(Test.java:11)
<pav@libra(pts/8).292>
JCK test source location:
==========================
/java/re/jck/1.5//nightly/binaries/latest/JCK-runtime-15/tests
Specific Machine Info:
=====================
SunOS archer 5.8 Generic_108528-20 sun4u sparc SUNW,Ultra-4
======================================================================
- relates to
-
JDK-4884916 JCK1.4a: 7 javax/swing/plaf/basic test fail, Win2k, plugin
-
- Closed
-