[jdk21u] RFR: 8367388: Tests start to fail on JDK-21 after JDK-8351907

Sergey Bylokhov serb at openjdk.org
Sun Sep 14 00:39:11 UTC 2025


On Thu, 11 Sep 2025 06:09:46 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

> After the patch for [JDK-8351907](https://bugs.openjdk.org/browse/JDK-8351907), in some cases it is no longer possible to load the XAWT toolkit under a SecurityManager in JDK 21.
> 
> The change in the mainline JDK removed the use of AccessController.doPrivileged, but in JDK 21u it is still required. Without it, access to system property (awt.robot.screenshotMethod) is blocked.
> 
> Fix: Restore use of [AccessController.doPrivileged](https://github.com/openjdk/jdk21u/commit/72d9bd69678dd54ef9e92f9c62073c0c4bf73c41#diff-2b4ac3949cd7faca02daa92815bd0e33d01f6f5b8914de2815d7cc5a864407f5L64) for property access in JDK 21u.
> Verified with jdk_desktop group in both headful and headless modes.

@GoeLin please take a look

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

PR Comment: https://git.openjdk.org/jdk21u/pull/469#issuecomment-3289015089


More information about the jdk-updates-dev mailing list