Jesse Glick 9f98136c3a 6956385: URLConnection.getLastModified() leaks file handles for jar:file and file: URLs
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
2023-06-28 15:33:37 +00:00
2016-05-30 16:17:11 +02:00

Welcome to the JDK!

For build instructions please see the online documentation, or either of these files:

See https://openjdk.org/ for more information about the OpenJDK Community and the JDK and see https://bugs.openjdk.org for JDK issue tracking.

Description
jdk-24 fork (from: https://github.com/openjdk/jdk) with modifications to be used in Wildcard-Usage analysis tools
Readme Multiple Licenses 1.3 GiB
Languages
Java 74.1%
C++ 13.9%
C 7.9%
Assembly 2.7%
Objective-C 0.4%
Other 0.8%