6988363: Rebrand vm vendor property settings (jdk7 only)
Vendor properties should be initialized after JDK version is determined. Reviewed-by: kamg, ohair, dcubed, dholmes
This commit is contained in:
parent
b7d1b4674b
commit
afc563751f
@ -119,11 +119,8 @@ void Arguments::init_system_properties() {
|
|||||||
PropertyList_add(&_system_properties, new SystemProperty("java.vm.specification.version", "1.0", false));
|
PropertyList_add(&_system_properties, new SystemProperty("java.vm.specification.version", "1.0", false));
|
||||||
PropertyList_add(&_system_properties, new SystemProperty("java.vm.specification.name",
|
PropertyList_add(&_system_properties, new SystemProperty("java.vm.specification.name",
|
||||||
"Java Virtual Machine Specification", false));
|
"Java Virtual Machine Specification", false));
|
||||||
PropertyList_add(&_system_properties, new SystemProperty("java.vm.specification.vendor",
|
|
||||||
JDK_Version::is_gte_jdk17x_version() ? "Oracle Corporation" : "Sun Microsystems Inc.", false));
|
|
||||||
PropertyList_add(&_system_properties, new SystemProperty("java.vm.version", VM_Version::vm_release(), false));
|
PropertyList_add(&_system_properties, new SystemProperty("java.vm.version", VM_Version::vm_release(), false));
|
||||||
PropertyList_add(&_system_properties, new SystemProperty("java.vm.name", VM_Version::vm_name(), false));
|
PropertyList_add(&_system_properties, new SystemProperty("java.vm.name", VM_Version::vm_name(), false));
|
||||||
PropertyList_add(&_system_properties, new SystemProperty("java.vm.vendor", VM_Version::vm_vendor(), false));
|
|
||||||
PropertyList_add(&_system_properties, new SystemProperty("java.vm.info", VM_Version::vm_info_string(), true));
|
PropertyList_add(&_system_properties, new SystemProperty("java.vm.info", VM_Version::vm_info_string(), true));
|
||||||
|
|
||||||
// following are JVMTI agent writeable properties.
|
// following are JVMTI agent writeable properties.
|
||||||
@ -151,6 +148,14 @@ void Arguments::init_system_properties() {
|
|||||||
os::init_system_properties_values();
|
os::init_system_properties_values();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Update/Initialize System properties after JDK version number is known
|
||||||
|
void Arguments::init_version_specific_system_properties() {
|
||||||
|
PropertyList_add(&_system_properties, new SystemProperty("java.vm.specification.vendor",
|
||||||
|
JDK_Version::is_gte_jdk17x_version() ? "Oracle Corporation" : "Sun Microsystems Inc.", false));
|
||||||
|
PropertyList_add(&_system_properties, new SystemProperty("java.vm.vendor", VM_Version::vm_vendor(), false));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provide a slightly more user-friendly way of eliminating -XX flags.
|
* Provide a slightly more user-friendly way of eliminating -XX flags.
|
||||||
* When a flag is eliminated, it can be added to this list in order to
|
* When a flag is eliminated, it can be added to this list in order to
|
||||||
|
@ -484,6 +484,9 @@ class Arguments : AllStatic {
|
|||||||
// System properties
|
// System properties
|
||||||
static void init_system_properties();
|
static void init_system_properties();
|
||||||
|
|
||||||
|
// Update/Initialize System properties after JDK version number is known
|
||||||
|
static void init_version_specific_system_properties();
|
||||||
|
|
||||||
// Property List manipulation
|
// Property List manipulation
|
||||||
static void PropertyList_add(SystemProperty** plist, SystemProperty *element);
|
static void PropertyList_add(SystemProperty** plist, SystemProperty *element);
|
||||||
static void PropertyList_add(SystemProperty** plist, const char* k, char* v);
|
static void PropertyList_add(SystemProperty** plist, const char* k, char* v);
|
||||||
|
@ -2898,6 +2898,9 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
|
|||||||
// So that JDK version can be used as a discrimintor when parsing arguments
|
// So that JDK version can be used as a discrimintor when parsing arguments
|
||||||
JDK_Version_init();
|
JDK_Version_init();
|
||||||
|
|
||||||
|
// Update/Initialize System properties after JDK version number is known
|
||||||
|
Arguments::init_version_specific_system_properties();
|
||||||
|
|
||||||
// Parse arguments
|
// Parse arguments
|
||||||
jint parse_result = Arguments::parse(args);
|
jint parse_result = Arguments::parse(args);
|
||||||
if (parse_result != JNI_OK) return parse_result;
|
if (parse_result != JNI_OK) return parse_result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user