JDK-8190919 :StaX buffers do not really close underlying buffers
sshamaia at in.ibm.com
Thu Nov 16 09:23:02 UTC 2017
Am not sure to which mailing-list, I can send issues related to xml-jaxp. I
found couple of xml-jaxp issues discussed in this mailing-list. Hence, am
sending to this group. Please let me know the correct mailing-list if this
is not the right one.
I had a brief analysis on the subject issue and identified that the StaX
buffers were not closed as the close method implemented for XMLStreamWriter
in XMLStreamWriterImpl.java does not call the close on the underlying
writer and instead calls only flush() on the writer.
Interestingly the close call was in fact coded but commented out. We looked
into the history of XMLStreamWriterImpl.java and found that the same code
exists from Java 6 GA or even before. Hence, we could not find the bug
which really introduced/commented out the close call.
I tested with close uncommented and it resolve the issue. I did not run the
jtreg and other tests as I could see that the bug is already assigned
to Joe Wang.
@Joe, please let me know whether you will continue with the analysis or you
want me to do other tests and contribute the patch.
With Thanks and Regards,
More information about the core-libs-dev