On Wed, 19 May 2021 15:23:48 GMT, Phil Race <p...@openjdk.org> wrote:

>> Anton Litvinov has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Second version of the fix
>
> src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterJob.java line 400:
> 
>> 398:                     throw (PrinterException) lastPrintEx;
>> 399:                 } else if (lastPrintEx instanceof RuntimeException) {
>> 400:                     throw (RuntimeException) lastPrintEx;
> 
> I don't see you testing this case 
> And do I understand correctly that this only throws the exception at the end 
> of the printloop after trying all pages ?

In the 2nd version of the fix I added testing of the scenario with 
"RuntimeException".

Yes, this code is executed only after the execution of the "printLoop" is fully 
finished for each of all page ranges. If printing of one page fails within one 
page range, then printing of other pages does not occur. 
"CPrinterJob.print(PrintRequestAttributeSet)" is blocking until printing is 
finished or fails, and my code is executed in the very end of the method.

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

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

Reply via email to