JDK-6652158 : javax/swing/JPopupMenu/6544309/bug6544309.java fails
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u10
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • CPU: x86
  • Submitted: 2008-01-18
  • 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.
JDK 6 JDK 7
6u10Fixed 7 b38Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
JDK		    : Fails:  6u10 b05
                      Passes: 6u10 b04

Platform Tested     : Windows Vista Home, Windows XP Pro
		      
Failing Test [s]    : javax/swing/JPopupMenu/6544309/bug6544309.java


    Test output:
    ============
----------System.out:(2/37)----------
Pressing DOWN ARROW
Pressing SPACE
----------System.err:(15/991)----------
java.lang.RuntimeException: If a JDialog is invoker for JPopupMenu, the menu cannot be handled by keyboard.
	at bug6544309.checkResult(bug6544309.java:79)
	at bug6544309.test(bug6544309.java:59)
	at bug6544309.main(bug6544309.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:83)
	at java.lang.Thread.run(Thread.java:619)

Comments
SUGGESTED FIX A fix is simple. We should add one more "down arrow" pressing in the test: test/closed/javax/swing/JPopupMenu/6544309/bug6544309.java + 72 System.out.println("Pressing DOWN ARROW"); + 73 robot.hitKey(KeyEvent.VK_DOWN); + 74 realSync();
18-01-2008

EVALUATION It is not a regression. The test case is only affected. A fix will not affect product binaries. The test fails because the first menu item is not highlighted when a popup menu appears. The problem is caused by the fix for 6217905(4740942). It exactly implemented the described behavior. A fix is simple. We should add one more "down arrow" pressing in the test case: test/closed/javax/swing/JPopupMenu/6544309/bug6544309.java + 72 System.out.println("Pressing DOWN ARROW"); + 73 robot.hitKey(KeyEvent.VK_DOWN); + 74 realSync();
18-01-2008