Fixes a ClassCastException (introduced as part of the "fix" for issue #502) in .impl.systray.jdic reported by Werner in an e-mail on the dev mailing list subjected "Class cast exception jdic".

cusax-fix
Lyubomir Marinov 17 years ago
parent 14f7ee8a95
commit 8de7b22bf7

@ -131,17 +131,22 @@ static void addMenuItem(Object menu, Object menuItem)
* this menu.
*
* @param protocolProvider the protocol provider corresponding to the
* account to remove.
* account to remove.
*/
private void removeAccount(ProtocolProviderService protocolProvider)
{
Object selector =
this.accountSelectors.get(protocolProvider.getAccountID());
Object selectorMenu;
if (selector instanceof StatusSimpleSelector)
selectorMenu = ((StatusSimpleSelector) selector).getMenu();
else
selectorMenu = ((StatusSelector) selector).getMenu();
if (menu instanceof Container)
((Container) menu).remove((Component) selector);
((Container) menu).remove((Component) selectorMenu);
else
((MenuContainer) menu).remove((MenuComponent) selector);
((MenuContainer) menu).remove((MenuComponent) selectorMenu);
}
/**

Loading…
Cancel
Save