JDK-6268039 : PIT: NPE when removing a tray icon from the notification area, GNOME
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2005-05-10
  • Updated: 2011-01-19
  • Resolved: 2005-05-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6Resolved
Related Reports
Duplicate :  
Relates :  
Description
I am adding a tray icon to the notification area in Linux / Sol10 - GNOME. Notification area is not currently visible on the GNOME panel and so the tray icon. Now When I call SystemTray.remove() method with the tray icon instance which was added previously I am getting a NullPointerException. This is reproducible on the current PIT build on Linux AS 3.0 as well as SolarisSparc10 with GNOME. 

Here is the exception:
java.lang.NullPointerException
at sun.awt.X11.XTrayIconPeer.dispose(XTrayIconPeer.java:208)
at java.awt.TrayIcon.removeNotify(TrayIcon.java:586)
at java.awt.SystemTray.remove(SystemTray.java:246)
at SystemTrayTest$ActionHandler.actionPerformed(SystemTrayTest.java:120)
at java.awt.Button.processActionEvent(Button.java:388)
at java.awt.Button.processEvent(Button.java:356)
at java.awt.Component.dispatchEventImpl(Component.java:4215)
at java.awt.Component.dispatchEvent(Component.java:4049)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:592)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:270)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:198)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:171)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:166)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:158)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:119)

Here is the PIT Build:
java version "1.6.0-awt.pit-int-awt-blade"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-awt.pit-int-awt-blade-df153228_06_May_2005_08_56-b00)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b35, mixed mode)

I have attached a sample test. Make sure you have removed the notification area from the gnome panel. Run the test. Click on the 'Remove Icon' button. You would get the above exception.
###@###.### 2005-05-10 17:02:22 GMT