[
https://issues.apache.org/jira/browse/PIVOT-1037?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Roger Whitcomb closed PIVOT-1037.
---------------------------------
Resolution: Fixed
Fix Version/s: 2.1.0
Closing pending further testing to verify, but the obvious exceptions shown
above are gone now.
> Removing tree nodes before they are visible will cause exceptions
> -----------------------------------------------------------------
>
> Key: PIVOT-1037
> URL: https://issues.apache.org/jira/browse/PIVOT-1037
> Project: Pivot
> Issue Type: Bug
> Components: wtk-terra
> Reporter: Roger Whitcomb
> Assignee: Roger Whitcomb
> Priority: Minor
> Fix For: 2.1.0
>
>
> 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)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)