United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6624204 Regression test fails: test/closed/javax/swing/JPopupMenu/4966112/bug4966112.java
JDK-6624204 : Regression test fails: test/closed/javax/swing/JPopupMenu/4966112/bug4966112.java

Details
Type:
Bug
Submit Date:
2007-10-31
Status:
Closed
Updated Date:
2011-05-18
Project Name:
JDK
Resolved Date:
2011-05-18
Component:
client-libs
OS:
linux
Sub-Component:
javax.swing
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Backport:
Relates:

Sub Tasks

Description
Regression test fails: test/closed/javax/swing/JPopupMenu/4966112/bug4966112.java

JDK: 7 b22
Tested OSes: 
- Solaris nevada b70: test fails
- Linux i686: test fails
- Windows XP: test passes

Stack trace:
java.lang.RuntimeException: 
Popup was not shown on spinner
Popup was not shown on filechooser
	at bug4966112.main(bug4966112.java:167)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:623)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:78)
	at java.lang.Thread.run(Thread.java:659) 

The test logs in the attachment.

                                    

Comments
EVALUATION

The problem is in the test. The same popup menu is used for all appearing frames. JRobot tries to open the menu in every frame by mouse click. However, the menu is never hidden explicitly. It causes the menu be appeared only at odd mouse clicks.

The problem can be solved by adding JPopupMenu.setVisible(false) before every frame disposing.
                                     
2007-12-29
SUGGESTED FIX

The approved webrev revision was copied to
NFS: /net/sa.sfbay/export/home/swing/data/7/6624204.0
URL: http://sa.sfbay.sun.com/projects/swing_data/7/6624204.0
                                     
2008-08-05



Hardware and Software, Engineered to Work Together