8133537: clarify position of unlock options in error messages
Reviewed-by: coleenp, dholmes, coffeys
--- a/hotspot/src/share/vm/runtime/globals.cpp Tue Aug 18 14:04:24 2015 -0400
+++ b/hotspot/src/share/vm/runtime/globals.cpp Wed Aug 19 11:11:06 2015 -0700
@@ -310,13 +310,17 @@
void Flag::get_locked_message(char* buf, int buflen) const {
buf[0] = '\0';
if (is_diagnostic() && !is_unlocked()) {
- jio_snprintf(buf, buflen, "Error: VM option '%s' is diagnostic and must be enabled via -XX:+UnlockDiagnosticVMOptions.\n",
- _name);
+ jio_snprintf(buf, buflen,
+ "Error: VM option '%s' is diagnostic and must be enabled via -XX:+UnlockDiagnosticVMOptions.\n"
+ "Error: The unlock option must precede '%s'.\n",
+ _name, _name);
return;
}
if (is_experimental() && !is_unlocked()) {
- jio_snprintf(buf, buflen, "Error: VM option '%s' is experimental and must be enabled via -XX:+UnlockExperimentalVMOptions.\n",
- _name);
+ jio_snprintf(buf, buflen,
+ "Error: VM option '%s' is experimental and must be enabled via -XX:+UnlockExperimentalVMOptions.\n"
+ "Error: The unlock option must precede '%s'.\n",
+ _name, _name);
return;
}
if (is_develop() && is_product_build()) {