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

Goetz Lindenmaier goetz at openjdk.org
Thu Sep 18 07:25:01 UTC 2025


On Sun, 14 Sep 2025 00:35:49 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

Hi @mrserb, thanks for catching this!
Will you do 17, too?

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

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


More information about the jdk-updates-dev mailing list