src/share/vm/runtime/arguments.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/runtime/arguments.cpp Thu Nov 6 14:55:29 2014
--- new/src/share/vm/runtime/arguments.cpp Thu Nov 6 14:55:29 2014
*** 325,337 ****
--- 325,341 ----
assert(version != NULL, "Must provide a version buffer");
while (obsolete_jvm_flags[i].name != NULL) {
const ObsoleteFlag& flag_status = obsolete_jvm_flags[i];
// <flag>=xxx form
// [-|+]<flag> form
if ((strncmp(flag_status.name, s, strlen(flag_status.name)) == 0) ||
+ size_t len = strlen(flag_status.name);
+ if (((strncmp(flag_status.name, s, len) == 0) &&
+ (strlen(s) == len)) ||
((s[0] == '+' || s[0] == '-') &&
(strncmp(flag_status.name, &s[1], strlen(flag_status.name)) == 0))) {
+ (strlen(&s[1]) == len) &&
+ (strncmp(flag_status.name, &s[1], len) == 0))
+ ) {
if (JDK_Version::current().compare(flag_status.accept_until) == -1) {
*version = flag_status.obsoleted_in;
return true;
}
}
*** 932,945 ****
--- 936,957 ----
jio_fprintf(defaultStream::error_stream(),
"Unrecognized VM option '%s'\n", argname);
Flag* fuzzy_matched = Flag::fuzzy_match((const char*)argname, arg_len, true);
if (fuzzy_matched != NULL) {
jio_fprintf(defaultStream::error_stream(),
! "Did you mean '%s%s%s'?\n",
! "Did you mean '%s%s%s'? ",
(fuzzy_matched->is_bool()) ? "(+/-)" : "",
fuzzy_matched->_name,
(fuzzy_matched->is_bool()) ? "" : "=<value>");
+ if (is_newly_obsolete(fuzzy_matched->_name, &since)){
+ char version[256];
+ since.to_string(version, sizeof(version));
+ jio_fprintf(defaultStream::error_stream(),
+ "Warning: support for %s was removed in %s\n",
+ fuzzy_matched->_name,
+ version);
+ }
}
}
// allow for commandline "commenting out" options like -XX:#+Verbose
return arg[0] == '#';
src/share/vm/runtime/arguments.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File