8203329: JDWP/JDI VM information string is incorrect

Make sure the native java.vm.info property also gets updated when the java version is.

Reviewed-by: sspitsyn, dholmes
This commit is contained in:
Chris Plummer 2018-06-07 19:01:18 -07:00
parent 42e75b8c79
commit 660dbcc16f
5 changed files with 123 additions and 3 deletions

View file

@ -4447,6 +4447,18 @@ void Arguments::PropertyList_unique_add(SystemProperty** plist, const char* k, c
PropertyList_add(plist, k, v, writeable == WriteableProperty, internal == InternalProperty);
}
// Update existing property with new value.
void Arguments::PropertyList_update_value(SystemProperty* plist, const char* k, const char* v) {
SystemProperty* prop;
for (prop = plist; prop != NULL; prop = prop->next()) {
if (strcmp(k, prop->key()) == 0) {
prop->set_value(v);
return;
}
}
assert(false, "invalid property");
}
// Copies src into buf, replacing "%%" with "%" and "%p" with pid
// Returns true if all of the source pointed by src has been copied over to
// the destination buffer pointed by buf. Otherwise, returns false.