United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6375901 : Zephyr closes the underlying OutputStream incorrectly

Details
Type:
Bug
Submit Date:
2006-01-23
Status:
Resolved
Updated Date:
2012-04-25
Project Name:
JDK
Resolved Date:
2006-05-08
Component:
xml
OS:
generic
Sub-Component:
javax.xml.stream
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
beta
Fixed Versions:

Related Reports

Sub Tasks

Description
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.

                                    

Comments
EVALUATION

clear spec violation.
                                     
2006-02-07



Hardware and Software, Engineered to Work Together