RFR: 8212136: Remove BaseSSLSocketImpl finalizer method [v3]

Xue-Lei Andrew Fan xuelei at openjdk.java.net
Mon May 2 05:01:22 UTC 2022


On Sat, 30 Apr 2022 03:46:23 GMT, Bradford Wetmore <wetmore at openjdk.org> wrote:

>> Xue-Lei Andrew Fan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   comment about remove finalize() method
>
> src/java.base/share/classes/sun/security/ssl/BaseSSLSocketImpl.java line 265:
> 
>> 263:     }
>> 264: 
>> 265:     /**
> 
> Can you please add a quick couple lines here with the technical rationale for removing it, so we don't forget down the road.
> 
> i.e.
> 
>     There used to be a finalize() here, but decided that was not
>     needed.  If users don't properly close the socket...
> 
>     The native resources are handled by the Socket Cleaner.

It may be not common to comment on non-existing method.  Maybe,  the class description could be a place to add this note.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8065



More information about the security-dev mailing list