On Tue, 16 Jun 2026 17:44:24 GMT, Valerie Peng <[email protected]> wrote:
>> Brent Christian has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> add new test to test lists
>
> src/java.smartcardio/share/classes/sun/security/smartcardio/CardImpl.java
> line 327:
>
>> 325: } catch (PCSCException e) {
>> 326: throw new CardException("disconnect() failed", e);
>> 327: } finally {
>
> Is it possible to enhance the Context class to handle the flag so we don't
> have multiple places calling `SCardDisconnect(...)`?
I myself don't see much benefit to that.
`disconnect()` would still need to keep its current logic. `SCardDisconnect`
still needs to be called in two different circumstances (Cleaner-called
`run()`, and user-called `disconnect()`). I'm not sure the advantage of that
call coming from a new method in `Context`, vs from `disconnect()` directly.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/30683#discussion_r3430807709