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

DOMResult.setNextSibling doesn't work correctly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0
    • Component/s: xml

      Backports

        Description

        The implementation of the method isn't correctly implemented, and as a result the following uni test fails:

                DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                dbf.setNamespaceAware(true);
                DocumentBuilder parser = dbf.newDocumentBuilder();
                Document dom = parser.parse(Bug.class.getResourceAsStream("test2.xml"));

                DOMResult r = new DOMResult();
                
                r.setNode(dom.getDocumentElement());
                r.setNextSibling(r.getNode().getFirstChild());

        test2.xml:
        <?xml version="1.0"?>
        <root>
          <f1/>
          <f2/>
          <f3/>
        </root>

        ###@###.### 2004-07-13
        ###@###.### 2004-07-13

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                kkawagucsunw Kohsuke Kawaguchi (Inactive)
                Reporter:
                kkawagucsunw Kohsuke Kawaguchi (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: