Name: rmT116609 Date: 05/24/2004
A DESCRIPTION OF THE PROBLEM :
The documentation for InputStream.close() says that it closes the stream "and releases any system resources associated with the stream."
This important note finds its way into all of the types derived from InputStream, except for
InflaterInputStream
ZipInputStream
GZipInputStream
...which merely state "Closes the input stream."
The interesting thing about the libzip-related streams is that they *do* maintain external resources (on solaris), which need releasing. We just closed a significant leak related to this, and some documentation might have helped.
The ZipInputStream.close() method description states:
Closes the ZIP input stream.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
adjust the doc for close() in the three above classes to read just like that of all their brethren:
"Closes this input stream and releases any system resources associated with the stream."
ACTUAL -
Closes the input stream.
URL OF FAULTY DOCUMENTATION :
http://java.sun.com/j2se/1.4.2/docs/api/java/util/zip/InflaterInputStream.html#close()
http://java.sun.com/j2se/1.4.2/docs/api/java/util/zip/GZIPInputStream.html#close()
http://java.sun.com/j2se/1.4.2/docs/api/java/util/zip/ZipInputStream.html#close()
(Incident Review ID: 274920)
======================================================================
|