RFR: 8266242: java/awt/GraphicsDevice/CheckDisplayModes.java failing on macOS 11 ARM

Alexander Zvegintsev azvegint at openjdk.org
Thu Oct 12 18:52:12 UTC 2023


On Thu, 12 Oct 2023 17:54:07 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

> As a workaround changing the method that filters out valid resolutions to not allow resolutions unsupported by Apple m1/m2 chips to be reported back to Java side.
> 
> Also removing test from problem list as it should pass again now.

Marked as reviewed by azvegint (Reviewer).

src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsDevice.m line 38:

> 36: #define DEFAULT_DEVICE_DPI 72
> 37: 
> 38: static NSInteger architecture = -1;

This is optional, but since the `architecture` variable is only used in `isValidDisplayMode`, it can be declared [static](https://stackoverflow.com/a/4965145) inside the method itself.

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

PR Review: https://git.openjdk.org/jdk/pull/16169#pullrequestreview-1674910801
PR Review Comment: https://git.openjdk.org/jdk/pull/16169#discussion_r1357251325


More information about the client-libs-dev mailing list