changeset 32128:8506d9dade57

6544871: java/awt/event/KeyEvent/KeyTyped/CtrlASCII.html fails from jdk b09 on windows Reviewed-by: serb
author yan
date Fri, 31 Jul 2015 13:13:30 +0300
parents eda186393829
children 51464cf078d5
files jdk/test/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/test/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java	Thu Jul 30 19:10:23 2015 +0300
+++ b/jdk/test/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java	Fri Jul 31 13:13:30 2015 +0300
@@ -257,8 +257,12 @@
     }// 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);
     }