<AWT Dev> RFR: 8212700: Change the mechanism by which JDK loads the platform-specific AWT Toolkit
philip.race at oracle.com
Mon May 6 22:11:02 UTC 2019
Please review this bug + CSR to remove the awt.headless system property.
This should be the last of the fixes to remove use of system
properties set in the launcher to specify per-platform
internal classes and/or behaviours of the java.desktop module.
Half of the change is removing code from the launcher, and
then some small changes in Toolkit.java to consult a new
method in the per-platform internal PlatformGraphicsInfo.java class.
However it was also necessary to update each of the platform toolkit class
constructor code since they all get/set a system property to support
extra mouse buttons (I don't know why this could not be shared in
SunToolkit but that is another matter than this fix), and two of them
access the root thread group. Previously they inherited privileges
from the code in java.awt.Toolkit which instantiated them but now
they need to assert the privileges directly - at to the point of use.
As well as adding a simple new regression test, all the automated
headless tests and many automated headful tests were run as well
as basic manual testing.
The CSR also covers updating the javadoc of Toolkit.getDefaultToolkit()
More information about the awt-dev