8130266: Change the mechanism by which JDK loads the platform-specific GraphicsEnvironment class

Reviewed-by: serb, bchristi
This commit is contained in:
Phil Race 2019-04-29 10:16:58 -07:00
parent 1aea77ae37
commit d43616c60a
13 changed files with 238 additions and 76 deletions

View file

@ -92,7 +92,6 @@ public final class SystemProps {
putIfAbsent(props, "socksNonProxyHosts", raw.propDefault(Raw._socksNonProxyHosts_NDX));
putIfAbsent(props, "awt.toolkit", raw.propDefault(Raw._awt_toolkit_NDX));
putIfAbsent(props, "java.awt.headless", raw.propDefault(Raw._java_awt_headless_NDX));
putIfAbsent(props, "java.awt.graphicsenv", raw.propDefault(Raw._java_awt_graphicsenv_NDX));
putIfAbsent(props, "sun.arch.abi", raw.propDefault(Raw._sun_arch_abi_NDX));
putIfAbsent(props, "sun.arch.data.model", raw.propDefault(Raw._sun_arch_data_model_NDX));
putIfAbsent(props, "sun.os.patch.level", raw.propDefault(Raw._sun_os_patch_level_NDX));
@ -206,8 +205,7 @@ public final class SystemProps {
@Native private static final int _http_proxyPort_NDX = 1 + _http_proxyHost_NDX;
@Native private static final int _https_proxyHost_NDX = 1 + _http_proxyPort_NDX;
@Native private static final int _https_proxyPort_NDX = 1 + _https_proxyHost_NDX;
@Native private static final int _java_awt_graphicsenv_NDX = 1 + _https_proxyPort_NDX;
@Native private static final int _java_awt_headless_NDX = 1 + _java_awt_graphicsenv_NDX;
@Native private static final int _java_awt_headless_NDX = 1 + _https_proxyPort_NDX;
@Native private static final int _java_io_tmpdir_NDX = 1 + _java_awt_headless_NDX;
@Native private static final int _line_separator_NDX = 1 + _java_io_tmpdir_NDX;
@Native private static final int _os_arch_NDX = 1 + _line_separator_NDX;

View file

@ -208,19 +208,6 @@ Java_jdk_internal_util_SystemProps_00024Raw_platformProperties(JNIEnv *env, jcla
PUTPROP(propArray, _awt_toolkit_NDX, sprops->awt_toolkit);
/* Java2D properties */
/* Note: java.awt.graphicsenv is an implementation private property which
* just happens to have a java.* name because it is referenced in
* a java.awt class. It is the mechanism by which the implementation
* finds the appropriate class in the JRE for the platform.
* It is explicitly not designed to be overridden by clients as
* a way of replacing the implementation class, and in any case
* the mechanism by which the class is loaded is constrained to only
* find and load classes that are part of the JRE.
* This property may be removed if that mechanism is redesigned
*/
PUTPROP(propArray, _java_awt_graphicsenv_NDX, sprops->graphics_env);
PUTPROP_PlatformString(propArray, _java_io_tmpdir_NDX, sprops->tmp_dir);
PUTPROP_PlatformString(propArray, _user_name_NDX, sprops->user_name);

View file

@ -68,7 +68,6 @@ typedef struct {
char *sun_stdout_encoding;
char *sun_stderr_encoding;
char *graphics_env;
char *awt_toolkit;
char *unicode_encoding; /* The default endianness of unicode