JDK-8190919 :StaX buffers do not really close underlying buffers

Srividya Shamaiah sshamaia at in.ibm.com
Tue Dec 12 10:22:19 UTC 2017

Joe, Thanks you for your response.  I agree with you that the specification
says the underlying stream should not be closed. However, it is not clear
what was the reason for decided not to close the underlying stream. Also,
it is not evident at what point the underlying streams will get closed and
whether it will result in a resource leak. We understand not to close the
stream if it is shared by multiple threads. However, there should be a
logic like reference count which can decide the point at which the stream
can be closed. However, we are not finding any such mechanism in this area
of code and hence worried about the resource leak. Please let me know how
we will ensure that the underlying stream is not getting leaked.

With Thanks and Regards,
Srividya S

More information about the core-libs-dev mailing list