mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8012695: Assertion message displays %u and %s text instead of actual values
USe err_msg() to create a proper assertion message. Reviewed-by: twisti, coleenp, iklam
This commit is contained in:
parent
8c2c17a067
commit
d567edd809
1 changed files with 14 additions and 2 deletions
|
@ -304,7 +304,19 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
|
|||
|
||||
inline void assert_property(bool b, const char* msg, TRAPS) {
|
||||
#ifdef ASSERT
|
||||
if (!b) { fatal(msg); }
|
||||
if (!b) {
|
||||
ResourceMark rm(THREAD);
|
||||
fatal(err_msg(msg, _class_name->as_C_string()));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void assert_property(bool b, const char* msg, int index, TRAPS) {
|
||||
#ifdef ASSERT
|
||||
if (!b) {
|
||||
ResourceMark rm(THREAD);
|
||||
fatal(err_msg(msg, index, _class_name->as_C_string()));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -312,7 +324,7 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
|
|||
if (_need_verify) {
|
||||
guarantee_property(property, msg, index, CHECK);
|
||||
} else {
|
||||
assert_property(property, msg, CHECK);
|
||||
assert_property(property, msg, index, CHECK);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue