RFR: 8320443: [macos] Test java/awt/print/PrinterJob/PrinterDevice.java fails on macOS

Andrey Turbanov aturbanov at openjdk.org
Wed Nov 22 07:52:08 UTC 2023


On Tue, 21 Nov 2023 21:23:12 GMT, Phil Race <prr at openjdk.org> wrote:

> For as long as we've had the macOS port, it seems that queries on the GraphicsConfiguration associated with
> a printer would give you null for the defaultTransform.
> Clearly this API isn't a popular one to call in such a context else we'd have had lots of reports.
> We have a test that would have caught it except that until recently the macOS printing implementation
> was swallowing exceptions it should not.

src/java.desktop/share/classes/sun/print/RasterPrinterJob.java line 2096:

> 2094: 
> 2095:     synchronized protected void setGraphicsConfigInfo(AffineTransform at,
> 2096:                                             double pw, double ph) {

Let's use blessed modifiers order
Suggestion:

    protected synchronized void setGraphicsConfigInfo(AffineTransform at,
                                                      double pw, double ph) {

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16773#discussion_r1401632131


More information about the client-libs-dev mailing list