Wicket
  1. Wicket
  2. WICKET-3710

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

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5-RC4
    • Fix Version/s: 1.4.18, 1.5-RC5
    • Component/s: wicket
    • Labels:
      None
    • Environment:
      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.

        Activity

        Igor Vaynberg made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.4.18 [ 12316329 ]
        Fix Version/s 1.5-RC5 [ 12316423 ]
        Resolution Fixed [ 1 ]
        Igor Vaynberg made changes -
        Field Original Value New Value
        Assignee Igor Vaynberg [ ivaynberg ]
        Richard Emberson created issue -

          People

          • Assignee:
            Igor Vaynberg
            Reporter:
            Richard Emberson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development