|
Quick Lists
|
|
Bug ID:
|
6583251
|
|
Votes
|
0
|
|
Synopsis
|
One more ClassCastException in Swing with TrayIcon
|
|
Category
|
java:classes_swing
|
|
Reported Against
|
|
|
Release Fixed
|
7(b20),
6u10(b05) (Bug ID:2152562)
|
|
State
|
10-Fix Delivered,
bug
|
|
Priority:
|
3-Medium
|
|
Related Bugs
|
6285881
,
6309495
,
6530871
,
6690791
|
|
Submit Date
|
20-JUL-2007
|
|
Description
|
Before JDK 6 all MouseEvents were generated by subclasses of awt.Component
so it was safe to cast mouseEvent.getSource() to awt.Component,
now it's not the case, because TrayIcon can generate MouseEvents
and TrayIcon doesn't extends awt.Component
so we get ClassCastException from several places
like BasicPopupMenu.MouseGrabber.eventDispatched(AWTEvent ev)
where we do Component src = (Component)ev.getSource();
we should fix it and not cast ev.getSource() without checking
Posted Date : 2007-07-20 13:44:02.0
|
|
Work Around
|
N/A
|
|
Evaluation
|
Everything is clear
we shouldn't cast mouseEvent.getSource() to Component
without checking
Posted Date : 2007-07-20 13:47:56.0
|
|
Comments
|
Submitted On 15-NOV-2007
Why not fixed in Mustang!?
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |