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

jdk1.6.0-b78 introduced an infinite recursive loop into XMLOutputFactoryImpl

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 5.0
    • xml

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      jdk1.6.0 build 78 introduces an infinite recursive loop into
      com.sun.xml.internal.stream.XMLOutputFactoryImpl.createXMLStreamWriter(javax.xml.transform.Result)
      at line 93 of XMLOutputFactoryImpl.java


      The call
      public javax.xml.stream.XMLStreamWriter createXMLStreamWriter(javax.xml.transform.Result result) throws javax.xml.stream.XMLStreamException {

              if(result instanceof StreamResult){
                  return createXMLStreamWriter((StreamResult)result); // this is the infinite recursive loop
      ...

      just calls back to itself, since there is no createXMLStreamWriter that takes a StreamResult as an argument.


      You probably intended to call
      javax.xml.stream.XMLStreamWriter createXMLStreamWriter(javax.xml.transform.stream.StreamResult sr, String encoding) throws javax.xml.stream.XMLStreamException {

      defined on line 175, but that method takes an additional parameter (an encoding).

      This bug was found using FindBugs, a static analysis defect detection tool for Java.

      http://findbugs.sourceforge.net/


      Bill Pugh



      REPRODUCIBILITY :
      This bug can be reproduced always.

            Unassigned Unassigned
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: