Apply https://issues.apache.org/jira/browse/HARMONY-4307.

They didn't add a test for this; supposedly it fixed a flaky AWT test. But
the change looks plausible.

Change-Id: I358849a20d5e38d01d6c77a4c335002bb7bba095
1 file changed