On Fri, 10 Apr 2026 18:41:27 GMT, Brent Christian <[email protected]> wrote:

> This is a pull request to convert the finalizer in 
> `sun.security.smartcardio.CardImpl` to use Cleaner instead.

Has there been any static analysis done to get some sense as to how common it 
is to not disconnect a connection to a card or close a card channel? Asking 
because it would be nice if we could just remove the undocumented use of the 
finalizer. Related is that the example in the package example should be using 
try-finally to ensure that disconnect is called (I'm sure there has been 
discussed about having Card and CardChannel implement AutoClosable but the 
smartcard API is a bit awkward in that's a standalone technology, not part of 
Java SE but happens to be bundled with the JDK).

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

PR Comment: https://git.openjdk.org/jdk/pull/30683#issuecomment-4243073606

Reply via email to