Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-3710

org/ apache/wicket/markup/html/tree/AbstractTree.java treeNodesRemoved loops forever

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.5-RC4
    • 1.4.18, 1.5-RC5
    • wicket
    • None
    • all

    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))

      { getTreeState().selectNode(selectedNode, false); }

      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.

      Attachments

        Activity

          People

            ivaynberg Igor Vaynberg
            emberson Richard Emberson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: