--- a/src/hotspot/share/oops/constantPool.cpp Thu Apr 04 17:23:05 2019 -0400
+++ b/src/hotspot/share/oops/constantPool.cpp Thu Apr 04 09:39:44 2019 +0200
@@ -1000,14 +1000,17 @@
if ((callee->is_interface() && m_tag.is_method()) ||
((!callee->is_interface() && m_tag.is_interface_method()))) {
ResourceMark rm(THREAD);
- char buf[400];
- jio_snprintf(buf, sizeof(buf),
- "Inconsistent constant pool data in classfile for class %s. "
- "Method %s%s at index %d is %s and should be %s",
- callee->name()->as_C_string(), name->as_C_string(), signature->as_C_string(), index,
- callee->is_interface() ? "CONSTANT_MethodRef" : "CONSTANT_InterfaceMethodRef",
- callee->is_interface() ? "CONSTANT_InterfaceMethodRef" : "CONSTANT_MethodRef");
- THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), buf);
+ stringStream ss;
+ ss.print("Inconsistent constant pool data in classfile for class %s. "
+ "Method '", callee->name()->as_C_string());
+ signature->print_as_signature_external_return_type(&ss);
+ ss.print(" %s(", name->as_C_string());
+ signature->print_as_signature_external_parameters(&ss);
+ ss.print(")' at index %d is %s and should be %s",
+ index,
+ callee->is_interface() ? "CONSTANT_MethodRef" : "CONSTANT_InterfaceMethodRef",
+ callee->is_interface() ? "CONSTANT_InterfaceMethodRef" : "CONSTANT_MethodRef");
+ THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), ss.as_string());
}
Klass* klass = this_cp->pool_holder();