United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-5052129 Zip/Inflater/GZIPInputStream.close() doesn't mention external resources.
JDK-5052129 : Zip/Inflater/GZIPInputStream.close() doesn't mention external resources.

Details
Type:
Bug
Submit Date:
2004-05-24
Status:
Resolved
Updated Date:
2004-06-17
Project Name:
JDK
Resolved Date:
2004-06-17
Component:
core-libs
OS:
solaris_8
Sub-Component:
java.util.jar
CPU:
sparc
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.2
Fixed Versions:
5.0 (b57)

Related Reports

Sub Tasks

Description

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) 
======================================================================

                                    

Comments
EVALUATION

Agreed.
###@###.### 2004-06-01
                                     
2004-06-01
PUBLIC COMMENTS

-
                                     
2004-06-25
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger-rc

FIXED IN:
tiger-rc

INTEGRATED IN:
tiger-b57
tiger-rc


                                     
2004-06-25



Hardware and Software, Engineered to Work Together