On Tue, 12 May 2026 04:30:27 GMT, Brent Christian <[email protected]> wrote:
>> test/jdk/sun/security/smartcardio/TestCleaner.java line 71:
>>
>>> 69: Card card = terminal.connect("*");
>>> 70: if (card == null) {
>>> 71: System.out.println("Skipping the test: " +
>>
>> This should be a skipped exception imo, it will look like it's passed
>> otherwise
>
> This test is meant only to test a specific thing - that the new cleaning
> action does not prevent the Card object (CardImpl, to be precise) from being
> collected.
>
> If no Card object can be obtained, this can't be tested. I think it can be
> skipped. It's common for other tests in the smartcardio/ test directory to be
> skipped if conditions aren't right.
>
> In my view, if the terminal senses that a card is present, but connect() does
> not yield a Card object, that indicates a problem in some other part of the
> system. I would expect it to be caught by one of the other tests.
My preference here would be to keep the same testing approach as pre-existing
for this part of the codebase, and if any changes / improvements are desired
that they are tackled as a separate PR and across the board.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/30683#discussion_r3225266912