<AWT Dev> RFR: 8212700: Change the mechanism by which JDK loads the platform-specific AWT Toolkit

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Wed May 8 06:38:02 UTC 2019

OK, looks fine then.

> On 5/7/19, 7:47 PM, Sergey Bylokhov wrote:
>> Hi, Phil.
>> Looks fine, but probably it will be worth to rename PlatformGraphicsInfo to PlatformInfo?
> I don't want (or intend) to do that. I already knew I was going
> to re-use this class for this purpose when I created it and adjusted
> the classname then to be reasonably acceptable. There is no ideal
> and PlatformInfo isn't it either.
> -phil.
>> On 06/05/2019 15:11, Phil Race wrote:
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8212700
>>> CSR: https://bugs.openjdk.java.net/browse/JDK-8223417
>>> Webrev: https://cr.openjdk.java.net/~prr/8212700
>>> 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()
>>> -phil

Best regards, Sergey.

More information about the awt-dev mailing list