RFR: 8366359: Test should throw SkippedException when there is no lpstat [v4]
SendaoYan
syan at openjdk.org
Fri Aug 29 13:06:46 UTC 2025
On Fri, 29 Aug 2025 12:51:43 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 1. add import java.io.IOException; 2. Re-throw the IOException if do not throw SkippeException
>
> test/jdk/javax/print/PrintServiceLookup/CountPrintServices.java line 50:
>
>> 48: }
>> 49: String[] lpcmd = { "lpstat", "-a" };
>> 50: Process proc = null;
>
> Suggestion:
>
> Process proc;
>
> The assignment is now redundant. The variable is always initialised inside the `try` block, otherwise an exception is thrown.
Thanks. The initialization has been removed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26988#discussion_r2310110541
More information about the client-libs-dev
mailing list