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

TrayIcon passes itself to MouseEvent constructor generating ClassCastException

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      ADDITIONAL SYSTEM INFORMATION :
      Windows 10

      A DESCRIPTION OF THE PROBLEM :
      In native code TrayIcon creates a MouseEvent passing itself as the target BUT TrayIcon is not an awt Component.
      See here:
      https://github.com/openjdk/jdk/blob/master/src/java.desktop/windows/native/libawt/windows/awt_TrayIcon.cpp#L521
      This is ignored in OpenJDK but generates a ClassCastException in GraalVM
      See here:
      https://github.com/oracle/graal/issues/3414


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Attempt to use TrayIcon and compile in GraalVM

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Use TrayIcon
      ACTUAL -
      Native code generates a ClassCastException and fails.

      ---------- BEGIN SOURCE ----------
      See GraalVM bug.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      None.

      FREQUENCY : always


        Attachments

          Activity

            People

            Assignee:
            pnarayanaswa Praveen Narayanaswamy
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: