< prev index next >
src/share/vm/services/management.cpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 1608,1628 ****
THROW_MSG(vmSymbols::java_lang_NullPointerException(),
"The flag name cannot be null.");
}
char* name = java_lang_String::as_utf8_string(fn);
! FormatBuffer<80> err_msg("%s", "");
! int succeed = WriteableFlags::set_flag(name, new_value, Flag::MANAGEMENT, err_msg);
if (succeed != Flag::SUCCESS) {
if (succeed == Flag::MISSING_VALUE) {
// missing value causes NPE to be thrown
THROW(vmSymbols::java_lang_NullPointerException());
} else {
// all the other errors are reported as IAE with the appropriate error message
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
! err_msg.buffer());
}
}
assert(succeed == Flag::SUCCESS, "Setting flag should succeed");
JVM_END
--- 1608,1628 ----
THROW_MSG(vmSymbols::java_lang_NullPointerException(),
"The flag name cannot be null.");
}
char* name = java_lang_String::as_utf8_string(fn);
! FormatBuffer<80> error_msg("%s", "");
! int succeed = WriteableFlags::set_flag(name, new_value, Flag::MANAGEMENT, error_msg);
if (succeed != Flag::SUCCESS) {
if (succeed == Flag::MISSING_VALUE) {
// missing value causes NPE to be thrown
THROW(vmSymbols::java_lang_NullPointerException());
} else {
// all the other errors are reported as IAE with the appropriate error message
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
! error_msg.buffer());
}
}
assert(succeed == Flag::SUCCESS, "Setting flag should succeed");
JVM_END
< prev index next >