RFR: 8366359: Test should throw SkippedException when there is no lpstat [v3]
SendaoYan
syan at openjdk.org
Fri Aug 29 10:33:44 UTC 2025
On Fri, 29 Aug 2025 09:27:38 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Remove unnecessary whitespace
>
> test/jdk/javax/print/PrintServiceLookup/CountPrintServices.java line 57:
>
>> 55: }
>> 56: }
>> 57: proc.waitFor();
>
> If `IOException` is thrown, `proc` will be `null` which will produce `NullPointerException`.
>
> I think you should re-throw the `IOException` if its message is different from the case where you throw `SkippedException`.
I have re-thow the IOException if the SkippedException do not throw.
But I have no idea how to verify this special situation( `Runtime.getRuntime().exec(lpcmd)` throw IOException but do not contains "No such file or directory" stack trace )
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26988#discussion_r2309807528
More information about the client-libs-dev
mailing list