JDK-6624187 : Regression test fails: test/closed/javax/swing/JComboBox/6428549/bug6428549.java
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_nevada
  • CPU: generic
  • Submitted: 2007-10-31
  • Updated: 2011-05-18
  • Resolved: 2011-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
6u10Fixed 7 b38Fixed
Related Reports
Relates :  
Regression test fails: test/closed/javax/swing/JComboBox/6428549/bug6428549.java

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

Stack trace:
java.lang.RuntimeException: JComboBox doesn't properly handle the ENTER key pressing for popup item selection.
	at SwingTestHelper.fail(SwingTestHelper.java:691)
	at bug6428549.onBackgroundThread30(bug6428549.java:139)
	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 SwingTestHelper.invoke(SwingTestHelper.java:625)
	at SwingTestHelper.controlLoop(SwingTestHelper.java:571)
	at SwingTestHelper.access$700(SwingTestHelper.java:173)
	at SwingTestHelper$4.run(SwingTestHelper.java:497)
	at java.lang.Thread.run(Thread.java:675) 

The test logs in the attachment.

SUGGESTED FIX The approved webrev revision was copied to NFS: /net/sa.sfbay/export/home/swing/data/7/6624187.0 URL: http://sa.sfbay.sun.com/projects/swing_data/7/6624187.0

EVALUATION The problem is in the test. JRobot.mouseMove() is used in the 132 line. It should highlight the first menu item. For some reason the item isn't selected. To solve the problem mouseMove() should be replaced by JRobot.glide(), which moves mouse cursor smoothly and highlights the item.