On Tue, 5 Dec 2023 19:45:34 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
>> Phil Race has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8320443 > > test/jdk/java/awt/print/PrinterJob/PrinterDevice.java line 30: > >> 28: * @summary Checks that the PrinterGraphics is for a Printer >> GraphicsDevice. >> 29: * Test doesn't run unless there's a printer on the system. >> 30: * @key printer > > Minor: we agreed to put `@key` after `@bug`. ok .. > test/jdk/java/awt/print/PrinterJob/PrinterDevice.java line 71: > >> 69: if (failed) { >> 70: throw new RuntimeException("Test failed but no exception >> propagated."); >> 71: } > > A comment that `pj.print` should not throw exception would suffice, even > though it's implied by jtreg any way. > > This statement is essentially unreachable if `failed` is set to `true`. On JDK 17 and earlier you will reach this line with this test as written And without that exception, the test would pass when it should fail. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16773#discussion_r1416216067 PR Review Comment: https://git.openjdk.org/jdk/pull/16773#discussion_r1416222142