mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8233958: Memory retention due to HttpsURLConnection finalizer that serves no purpose
Reviewed-by: dfuchs, rriggs
This commit is contained in:
parent
7ba4fc4722
commit
9f91b8dde2
2 changed files with 0 additions and 19 deletions
|
@ -72,13 +72,4 @@ public class DelegateHttpsURLConnection extends AbstractDelegateHttpsURLConnecti
|
|||
protected javax.net.ssl.HostnameVerifier getHostnameVerifier() {
|
||||
return httpsURLConnection.getHostnameVerifier();
|
||||
}
|
||||
|
||||
/*
|
||||
* Called by layered delegator's finalize() method to handle closing
|
||||
* the underlying object.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void dispose() throws Throwable {
|
||||
super.finalize();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -461,16 +461,6 @@ public class HttpsURLConnectionImpl
|
|||
delegate.setDefaultUseCaches(defaultusecaches);
|
||||
}
|
||||
|
||||
/*
|
||||
* finalize (dispose) the delegated object. Otherwise
|
||||
* sun.net.www.protocol.http.HttpURLConnection's finalize()
|
||||
* would have to be made public.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() throws Throwable {
|
||||
delegate.dispose();
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
return this == obj || ((obj instanceof HttpsURLConnectionImpl) &&
|
||||
delegate.equals(((HttpsURLConnectionImpl)obj).delegate));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue