RFR: 8335231: [macos] Test java/awt/print/PrinterJob/Cancel/PrinterJobCancel.java failed on macOS because the case didn't get the expected PrintAbortException

Prasanta Sadhukhan psadhukhan at openjdk.org
Fri Jul 5 08:31:23 UTC 2024


On Thu, 4 Jul 2024 10:34:24 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

> When a printjob is cancelled midway, `PrinterAbortException `was not thrown in macos. because 
> firstly,` cancelCheck` invokes` LWCToolkit.invokeLater` with null as parameter causing it to fail with NPE and
> secondly PrinterAbortException was consumed silently when `printLoop` throws any exception
> which is rectified to throw the PrinterAbortException when encountered..

I am not able to reproduce in windows, and I guess neither the submitter who raised this issue as it is mentioned in JBS
`Is it a platform-specific issue: Yes. This issue only happens on macOS.`
Maybe there is some issue in your physical printer configuration in which case you can try with "Microsoft Print-to-pdf" option

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

PR Comment: https://git.openjdk.org/jdk/pull/20027#issuecomment-2210434526


More information about the client-libs-dev mailing list