jdk-24/test/jdk/sun/net
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
..
ext 8260366: ExtendedSocketOptions <clinit> can deadlock in some circumstances 2021-02-26 14:07:35 +00:00
ftp 8274561: sun/net/ftp/TestFtpTimeValue.java timed out on slow machines 2021-10-01 08:52:04 +00:00
idn 8244283: test/jdk/sun/net/idn/TestStringPrep.java fails with --illegal-access=deny 2020-05-04 12:40:17 +01:00
InetAddress/nameservice 8262195: Harden tests that use the HostsFileNameService (jdk.net.hosts.file property) 2021-03-01 10:18:12 +00:00
spi 8305529: DefaultProxySelector.select(URI) in certain cases returns a List with null element 2023-04-13 01:30:00 +00:00
util 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
www 6956385: URLConnection.getLastModified() leaks file handles for jar:file and file: URLs 2023-06-28 15:33:37 +00:00
TelnetTest.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00