JDK-8333009 : Handle ConsumeNextMnemonicKeyTypedTest.java failure in 8u
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • Submitted: 2024-05-27
  • Updated: 2024-07-30
  • Resolved: 2024-07-24
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 8
8u441 masterFixed
Related Reports
Relates :  
Description
The test java/awt/KeyboardFocusmanager/ConsumeNextMnemonicKeyTypedTest/ConsumeNextMnemonicKeyTypedTest.java was updated in JDK-8063104, yet this fix cannot be backported to 8u because it should continue to use toolkit.realSync().

Yet in addition to that change, JDK-8063104 added support for macOS:

+        if (Platform.isOSX()) {
+            robot.keyPress(KeyEvent.VK_CONTROL);
+        }
         robot.keyPress(KeyEvent.VK_ALT);
// other keyPress
         robot.keyRelease(KeyEvent.VK_ALT);
+        if (Platform.isOSX()) {
+            robot.keyRelease(KeyEvent.VK_CONTROL);
+        }

This change should be applied and then the test can be removed from ProblemList.txt for macos.