< prev index next >
src/hotspot/share/oops/instanceKlass.cpp
Print this page
@@ -2640,13 +2640,18 @@
// If the interface isn't implemented by the receiver class,
// the VM should throw IncompatibleClassChangeError.
if (cnt >= nof_interfaces) {
ResourceMark rm(THREAD);
stringStream ss;
+ bool same_module = (module() == holder->module());
ss.print("Receiver class %s does not implement "
- "the interface %s defining the method to be called",
- class_loader_and_module_name(), holder->class_loader_and_module_name());
+ "the interface %s defining the method to be called "
+ "(%s%s%s)",
+ external_name(), holder->external_name(),
+ (same_module) ? joint_in_module_of_loader(holder) : class_in_module_of_loader(),
+ (same_module) ? "" : "; ",
+ (same_module) ? "" : holder->class_in_module_of_loader());
THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), ss.as_string());
}
Klass* ik = ioe->interface_klass();
if (ik == holder) break;
< prev index next >