mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8204268: Improve some IncompatibleClassChangeError messages
Reviewed-by: stuefe, hseigel
This commit is contained in:
parent
d2f70d7052
commit
731d9b1499
7 changed files with 174 additions and 34 deletions
|
@ -2641,7 +2641,12 @@ Method* InstanceKlass::method_at_itable(Klass* holder, int index, TRAPS) {
|
|||
// If the interface isn't implemented by the receiver class,
|
||||
// the VM should throw IncompatibleClassChangeError.
|
||||
if (cnt >= nof_interfaces) {
|
||||
THROW_NULL(vmSymbols::java_lang_IncompatibleClassChangeError());
|
||||
ResourceMark rm(THREAD);
|
||||
stringStream ss;
|
||||
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());
|
||||
THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), ss.as_string());
|
||||
}
|
||||
|
||||
Klass* ik = ioe->interface_klass();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue