9f98136c3a
Define FileURLConnection.closeInputStream for use by JarURLInputStream.close. JarURLConnection properly tracks any InputStream it itself opened, and correspondingly closes the JarFile if necessary (when caches are disabled). But if its underlying FileURLConnection was used to retrieve a header field, that would have caused a FileInputStream to be opened which never gets closed until it is garbage collected. This means that an application which calls certain methods on jar:file:/…something.jar!/… URLs will leak file handles, even if URLConnection caches are supposed to be turned off. This can delay release of system resources, and on Windows can prevent the JAR file from being deleted even after it is no longer in use (for example after URLClassLoader.close). Reviewed-by: dfuchs, michaelm |
||
---|---|---|
.. | ||
ext | ||
ftp | ||
idn | ||
InetAddress/nameservice | ||
spi | ||
util | ||
www | ||
TelnetTest.java |