Details
Description
In the new code just added to AbstractTree, what happens if the cursor is NOT a TreeNode:
for (Object selectedNode : selection)
{
Object cursor = selectedNode;
while (cursor != null)
{
if (removed.contains(cursor))
if (cursor instanceof TreeNode)
{ cursor = ((TreeNode)cursor).getParent(); } }
}
I will loop forever. Or, if cursor is always a TreeNode (or null), why do the instanceof test.