RFR: 8366359: Test should throw SkippedException when there is no lpstat [v2]

SendaoYan syan at openjdk.org
Fri Aug 29 09:15:50 UTC 2025


On Fri, 29 Aug 2025 08:41:11 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Use "@requires (os.family == "linux")" instead of check OS type in code
>
> test/jdk/javax/print/PrintServiceLookup/CountPrintServices.java line 53:
> 
>> 51:         proc = Runtime.getRuntime().exec(lpcmd);
>> 52:     } catch (java.io.IOException e) {
>> 53:         if(e.getMessage().contains("No such file or directory")) {
> 
> Suggestion:
> 
>         if (e.getMessage().contains("No such file or directory")) {
> 
> A space after the `if` keyword.

Thanks, fixed.

> test/jdk/javax/print/PrintServiceLookup/CountPrintServices.java line 54:
> 
>> 52:     } catch (java.io.IOException e) {
>> 53:         if(e.getMessage().contains("No such file or directory")) {
>> 54:             throw new SkippedException("Can not find lpstat, test skip");
> 
> Suggestion:
> 
>             throw new SkippedException("Cannot find lpstat");

Thanks for the reviews. Updated.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26988#discussion_r2309630500
PR Review Comment: https://git.openjdk.org/jdk/pull/26988#discussion_r2309631359


More information about the client-libs-dev mailing list