Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8160623

[PIT] Exception running java/awt/event/KeyEvent/KeyChar/KeyCharTest.java

    Details

    • Subcomponent:
    • Resolved In Build:
      b127
    • OS:
      windows

      Backports

        Description

        The test is java/awt/event/KeyEvent/KeyChar/KeyCharTest.java.

        First, in this PIT build there is a new quite unexpected exception running Windows (7 and 10) (plus a dump of some EncodeD):

        java.lang.IllegalArgumentException: invalid keyChar
                at java.awt.event.KeyEvent.<init>(java.desktop@9-ea/KeyEvent.java:1172)
                at sun.awt.windows.WToolkit.eventLoop(java.desktop@9-ea/Native Method)
                at sun.awt.windows.WToolkit.run(java.desktop@9-ea/WToolkit.java:314)
                at java.lang.Thread.run(java.base@9-ea/Thread.java:843)

        It is new in this PIT: b124 doesn't throw this.

        Second, a test bug:
        This test depends on a char returned by getKeyChar() from KEY_PRESSED and KEY_RELEASED. However that char is not necessary defined. According to the spec, "KEY_PRESSED and KEY_RELEASED events are not intended for reporting of character input." -- it's only KEY_TYPED event must report a valid keychar.

        As a result, the test fails on Windows with "Key char is not delete" and indeed, it is 0xFFFF (CHAR_UNDEFINED) which is expected.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ssadetsky Semyon Sadetsky
                  Reporter:
                  yan Yuri Nesterenko (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: