On Thu, 21 May 2026 11:01:43 GMT, Viktor Klang <[email protected]> wrote:

>> Brent Christian has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains nine additional 
>> commits since the last revision:
>> 
>>  - Merge branch 'master' into smartcardio
>>  - update copyright year
>>  - Merge branch 'master' into smartcardio
>>  - update example code in javax.smartcardio package doc to use try-finally
>>  - minor comment update
>>  - add missed clean() calls, update comments
>>  - fix imports and copyright years
>>  - add test case
>>  - convert CardImpl finalizer to use Cleaner
>
> src/java.smartcardio/share/classes/sun/security/smartcardio/CardImpl.java 
> line 255:
> 
>> 253:         try {
>> 254:             checkSecurity("exclusive");
>> 255:             checkState();
> 
> What's the reason that these checks are done within the try-finally whereas 
> the `openLogicalChannel()`-checks are done outside of the try-finally?

I think maybe github is rendering diffs in a confusing way?
In all cases, I add a new, outer try/finally block (for the 
reachabilityFence()) around the existing code.
`openLogicalChannel()` has the checks within this new try/finally block, as do 
the other methods.
Try enabling "Hide whitespace" (in the "gear" menu) and hopefully that will 
look better.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30683#discussion_r3285002940

Reply via email to