United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-8002114 fix failed for JDK-7160951: [macosx] ActionListener called twice for JMenuItem using ScreenMenuBar
JDK-8002114 : fix failed for JDK-7160951: [macosx] ActionListener called twice for JMenuItem using ScreenMenuBar

Details
Type:
Bug
Submit Date:
2012-11-01
Status:
Closed
Updated Date:
2013-09-16
Project Name:
JDK
Resolved Date:
2012-11-02
Component:
client-libs
OS:
os_x
Sub-Component:
javax.swing
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
8
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Backport:
Duplicate:
Relates:
Relates:
Relates:
Relates:

Sub Tasks

Description
ActionListener called once when run code from JDK-7160951 but if change accellerator to Ctrl-E, for example, then listener still called twice 

test results:
failed with jdk8b57, jdk8b58, jdk7u10b12, jdk7u6b06
passed with jdk7u6b05, jdk8b54

see comments for more details
                                    

Comments
The fix is a rather simple and low risk, just one changed line. I suggest we push it into 7u10. 
                                     
2012-11-01
URL:   http://hg.openjdk.java.net/jdk8/awt/jdk/rev/f4a11601680b
User:  leonidr
Date:  2012-11-02 15:47:57 +0000

                                     
2012-11-02
Need SQE to weigh in
                                     
2012-11-05
URL:   http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/f4a11601680b
User:  lana
Date:  2012-11-06 21:24:27 +0000

                                     
2012-11-06
Seems to be relatively corner case use case as Control is not main accelerator button on Mac OS. SQE recommends considering to postpone to 7u12 as impact is low and general guidance is to reduce risk to the release.
                                     
2012-11-07
recheck shows that test passed with jdk7u9b05 and failed since jdk7u10b08
                                     
2012-11-07
JDK-7160951(JDK-8002114) and JDK-7186371 should be fixed simultaneously, otherwise we introduce new regression in 7u10.
                                     
2012-11-07
this problem is reproducible with jdk7u10b14
comment corrected.
                                     
2012-11-12
SQE is OK to take this.
                                     
2012-11-14
JDK-8003901 was filed to provide a regression test for this issue, and as a result additional test case was added to javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java
                                     
2013-09-16



Hardware and Software, Engineered to Work Together