From 4fe22e82ebd3640c7999e094903874c9ac7f2391 Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Wed, 21 Aug 2024 00:35:13 +0000 Subject: [PATCH] 6544871: java/awt/event/KeyEvent/KeyTyped/CtrlASCII.html fails from jdk b09 on windows. Backport-of: 791267a0961353693ad6a92d888675b2e2837edc --- jdk/test/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jdk/test/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java b/jdk/test/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java index cf3f1e3d941..1c63ea856b6 100644 --- a/jdk/test/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java +++ b/jdk/test/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java @@ -257,8 +257,12 @@ public void start () }// start() public void punchCtrlKey( Robot ro, int keyCode ) { ro.keyPress(KeyEvent.VK_CONTROL); - ro.keyPress(keyCode); - ro.keyRelease(keyCode); + try { + ro.keyPress(keyCode); + ro.keyRelease(keyCode); + }catch(IllegalArgumentException iae) { + System.err.println("skip probably invalid keyCode "+keyCode); + } ro.keyRelease(KeyEvent.VK_CONTROL); ro.delay(200); }