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

Zephyr closes the underlying OutputStream incorrectly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • beta
    • xml
    • b84
    • generic
    • generic

      The XMLStreamWriter.close method says:

        /**
         * Close this writer and free any resources associated with the
         * writer. This must not close the underlying output stream.
         * @throws XMLStreamException
         */
        public void close()
          throws XMLStreamException;

      but Zephyr implements it as:

          /**
           * Close the underlying stream to which data is being written.
           * @throws XMLStreamException if an error occurs while closing the stream.
           */
          public void close() throws XMLStreamException {
              fReuse = true;
              try{
                  fWriter.close();
              }catch(IOException ioexception){
                  throw new XMLStreamException(ioexception);
              }
          }

      ... which is against the spec.

            sreddysunw Sunitha Reddy (Inactive)
            kkawagucsunw Kohsuke Kawaguchi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: