Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8266539

[TreeView]: Change.getRemoved() contains null item when deselecting a TreeItem

XMLWordPrintable

      When deselecting a TreeItem, the Change.getRemoved() contains a null entry. Instead it should contain only the item that was deselected.

      Steps:
      1. Run the attached test program
      2. Select child item of root
      3.Ctrl/Command click the same item to deselect it
      -> Observe the NPE that occurs because Change.getRemoved() contains a null entry

      The issue was also discussed in the review of JDK-8189354 at PR#480.
      The PR#480 had a change in MultipleModelSelectionModelBase.java that could fix this issue but it was reverted to limit the scope PR#480
      The reverted commit: https://github.com/openjdk/jfx/pull/480/commits/923f8d74039780065b02ac23d605cc010fde43b3

            mstrauss Michael Strauß
            arapte Ambarish Rapte
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: