-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
19
-
generic
-
generic
ADDITIONAL SYSTEM INFORMATION :
Win10 / JDK 19
A DESCRIPTION OF THE PROBLEM :
In the awt_TrayIcon.cpp source code a MouseEvent is created calling constructor and passing arg1 a TrayIcon object which is cast to a java.awt.Component.
TrayIcon is NOT derived from Component and this causes Cast exception to be thrown in GraalVM.
See code below:
https://github.com/openjdk/jdk/blob/master/src/java.desktop/windows/native/libawt/windows/awt_TrayIcon.cpp#L540
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Any simple app that uses SystemTray in Windows.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No Exception.
ACTUAL -
Exception in thread "AWT-Windows": java.lang.ClassCastException
java.lang.ClassCastException: java.awt.TrayIcon cannot be cast to java.awt.Component
---------- BEGIN SOURCE ----------
https://docs.oracle.com/javase/tutorial/uiswing/misc/systemtray.html
---------- END SOURCE ----------
FREQUENCY : always
Win10 / JDK 19
A DESCRIPTION OF THE PROBLEM :
In the awt_TrayIcon.cpp source code a MouseEvent is created calling constructor and passing arg1 a TrayIcon object which is cast to a java.awt.Component.
TrayIcon is NOT derived from Component and this causes Cast exception to be thrown in GraalVM.
See code below:
https://github.com/openjdk/jdk/blob/master/src/java.desktop/windows/native/libawt/windows/awt_TrayIcon.cpp#L540
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Any simple app that uses SystemTray in Windows.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No Exception.
ACTUAL -
Exception in thread "AWT-Windows": java.lang.ClassCastException
java.lang.ClassCastException: java.awt.TrayIcon cannot be cast to java.awt.Component
---------- BEGIN SOURCE ----------
https://docs.oracle.com/javase/tutorial/uiswing/misc/systemtray.html
---------- END SOURCE ----------
FREQUENCY : always