JDK-8003971 : NPE at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection
  • Type: Backport
  • Backport of: JDK-6671481
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u3,7u6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2012-11-26
  • Updated: 2013-11-19
  • Resolved: 2012-12-04
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 JDK 8
6u60Fixed 8 b68Fixed
Comments
Verified in jdk8b115 The bug seems to be fixed.
19-11-2013

I do not know steps to reproduce the issue, but the fixed issue 6505523 can shed light on this mysterious NPE. It is reproduced when drag is enabled and a node is removed by an expansion listener. The pressed path is stored in the BasicTreeUI during mouse pressed event. Then the expansion listener removes the path and the mouse released event checks the stored path by the getPathBounds() method and gets null (the path has been already removed).
26-11-2012