On Wed, 20 Sep 2023 13:09:55 GMT, Michal Sobierski <d...@openjdk.org> wrote:
>> test/jdk/java/awt/print/PrinterJob/ImagePrinting/NullClipARGB.java line 43: >> >>> 41: >>> 42: public static void main( String[] args ) { >>> 43: PrintService[] svc = >>> PrintServiceLookup.lookupPrintServices(DocFlavor.SERVICE_FORMATTED.PRINTABLE, >>> null); >> >> Do we need to ask for `DocFlavor.SERVICE_FORMATTED.PRINTABLE` here? Can we >> just ask for `null`? > > Correct me if I'm wrong, but I think if we ask for null here it may find a > PrintService that does not support PRINTABLE flavor so SkippedException will > not be thrown because svc.length will be greater than 0 and we may end up > with an exception thrown later in pj.print(). Oh, OK. So the idea is that if we use `setPrintable`, we need to lookup the service that accepts `.PRINTABLE`? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15821#discussion_r1331724860