I think it can be, although the problem with the other cases was that they were set by the launcher
and always appeared in the enumeration of system properties.

This case is not documented and isn't set .. but is an effective waste of code since any kind of external replacement isn't possible with the module system encapsulation and disallowance of
illegal access.

-phil.

On 9/9/21 7:07 AM, Alexander Scherbatiy wrote:
Hello,

There are two fixes which avoid using reflection during GraphicsEnvironment and Toolkit platform specific classes loading [1], [2]:   8130266 Change the mechanism by which JDK loads the platform-specific GraphicsEnvironment class   8212700 Change the mechanism by which JDK loads the platform-specific AWT Toolkit


The FontManagerFactory class still uses reflection to load platform specific FontManager class from "sun.font.fontmanager" property.

Should the "sun.font.fontmanager" property be removed in the same way as for GraphicsEnvironment and Toolkit properties and make FontManger loading from corresponding PlatformInfo classes?

[1] https://bugs.openjdk.java.net/browse/JDK-8130266
[2] https://bugs.openjdk.java.net/browse/JDK-8212700
[3] https://github.com/openjdk/jdk/blob/c81690d7166c32caff6ef3a55fe9b157049e2b56/src/java.desktop/share/classes/sun/font/FontManagerFactory.java#L79

Thanks,
Alexander.


Reply via email to