Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-1037

Removing tree nodes before they are visible will cause exceptions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.1.0
    • wtk-terra
    • None

    Description

      We build a tree, but don't expand it all initially.  User can do things that cause the tree to be rebuilt before the child nodes have become visible.  This leads to exceptions such as:

      java.lang.IndexOutOfBoundsException: Index 1 out of bounds [0,0].
      STACK TRACE:
      at org.apache.pivot.util.Utils.checkIndexBounds(Utils.java:246)
      at org.apache.pivot.collections.ArrayList.get(ArrayList.java:431)
      at org.apache.pivot.wtk.skin.terra.TerraTreeViewSkin.removeVisibleNodes(TerraTreeViewSkin.java:1358)
      at org.apache.pivot.wtk.skin.terra.TerraTreeViewSkin.nodesRemoved(TerraTreeViewSkin.java:2064)
      at org.apache.pivot.wtk.TreeViewNodeListener$Listeners.lambda$nodesRemoved$1(TreeViewNodeListener.java:38)
      at java.lang.Iterable.forEach(Iterable.java:75)
      at org.apache.pivot.wtk.TreeViewNodeListener$Listeners.nodesRemoved(TreeViewNodeListener.java:38)
      at org.apache.pivot.wtk.TreeView$BranchHandler.itemsRemoved(TreeView.java:365)
      at org.apache.pivot.collections.List$ListListenerList.lambda$itemsRemoved$1(List.java:57)
      at java.lang.Iterable.forEach(Iterable.java:75)
      at org.apache.pivot.collections.List$ListListenerList.itemsRemoved(List.java:57)
      at org.apache.pivot.wtk.content.TreeBranch.remove(TreeBranch.java:156)

      Attachments

        Activity

          People

            rwhitcomb Roger Lee Whitcomb
            rwhitcomb Roger Lee Whitcomb
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: