Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-5257

Node.ReplaceNode method fails cannot remove itself

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8.0
    • 1.8.6, 2.0-beta-3
    • XML Processing
    • None
    • ubuntu 11.04, eclipse 3.6, groovy eclipse plugin2.6.0.xx-20111212-0800-e36-RELEASE

    Description

      Perhaps this is not a frequent operation, but replaceNode method fails because of a nullpointer exception. The case corresponds to removing a root node from a xml document. This node has no parent (parent==null) and that is the point where the error is triggered. This may be considered a bad programming, but, anyway, the code should return something different from an exception.

      Attachments

        1. RemoveNodeFailureTest.groovy
          0.4 kB
          Jorge Gomez

        Activity

          People

            paulk Paul King
            escalope Jorge Gomez
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: