<AWT Dev>  Review Request: 8208702 javax/swing/reliability/HangDuringStaticInitialization.java may hang on macos
Sergey.Bylokhov at oracle.com
Tue Aug 7 02:06:31 UTC 2018
Please review the fix for jdk12.
The new test which was added as part of JDK-8189604 may hang on macOS
if it is run via ssh, and the user used in ssh and the current user in
GUI login session are different. But it works if the users are the same.
This is part of the spec describe why it works in some cases and does
not work in another:
"The reasons for this non-obvious behavior are lost in the depths of
history. However, the fact that this works at all is pretty much
irrelevant because there are important caveats that prevent it from
being truly useful."
Also please take a look to the "Listing 6" in the link above, which
describe similar situation.
Note that by default in such environment the java will use the headless
toolkit which works fine. But the test forces to use the "headful
toolkit" using "-Djava.awt.headless=false", which causes a hang in our
On unix in the same circumstances we will throw the AWTError. I have
implemented the same on macOS. If "Security Context" reports that
"sessionHasGraphicAccess" is false and the user requests "headful
toolkit" we will throw AWTError.
Best regards, Sergey.
More information about the awt-dev