Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8010819

Nodevisitor.enterXXXNode should return boolean

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 8
    • core-libs
    • None

      Right now it returns the node itself or null if iteration is to halt before entering the children. This is very counter intuitive, as it might be interpreted as promise to change the node, symmetrical to the return value of leaveXXXNode, which it definitely isn't.

      Change the enter return value to "should I continue or not" - a boolean. I've shot myself in the foot twice now.

            lagergren Marcus Lagergren
            lagergren Marcus Lagergren
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: