RFR: 8284898 : Enhance PassFailJFrame [v7]

Alexey Ivanov aivanov at openjdk.java.net
Sun Apr 17 22:09:43 UTC 2022


On Sat, 16 Apr 2022 22:54:43 GMT, Phil Race <prr at openjdk.org> wrote:

>> lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update PrintGlyphVectorTest.java
>
> test/jdk/java/awt/print/PrinterJob/PrintGlyphVectorTest.java line 131:
> 
>> 129:         PrinterJob pj = PrinterJob.getPrinterJob();
>> 130:         if (pj == null || pj.getPrintService() == null) {
>> 131:             System.out.println("Printer not configured or available."
> 
> I realise the test was already doing the pj == null check but per. the spec, this shouldn't happen
> https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/print/PrinterJob.html#getPrinterJob()

Right, and IDE generates a warning: _`pj == null` is always false_. I suggest removing this condition and thus resolving the warning.

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

PR: https://git.openjdk.java.net/jdk/pull/8004



More information about the client-libs-dev mailing list